bdev/nvme: use spdk_nvme_ctrlr_prepare_for_reset()
When preparing for a reset, use this new call to tell the driver to avoid sending DELETE_CQ/SQ commands to a PCIe controller when they aren't needed. Fixes issue #2073. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I9ebb7d5c3f7cbb1c3192f162f32edbbea41acde1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9250 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Matt Dumm <matt.dumm@hpe.com> Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
This commit is contained in:
parent
3cb9bc2593
commit
6e5d6032a0
@ -622,6 +622,7 @@ bdev_nvme_reset(struct nvme_ctrlr *nvme_ctrlr)
|
||||
|
||||
nvme_ctrlr->resetting = true;
|
||||
pthread_mutex_unlock(&nvme_ctrlr->mutex);
|
||||
spdk_nvme_ctrlr_prepare_for_reset(nvme_ctrlr->ctrlr);
|
||||
|
||||
/* First, delete all NVMe I/O queue pairs. */
|
||||
spdk_for_each_channel(nvme_ctrlr,
|
||||
|
@ -211,6 +211,7 @@ DEFINE_STUB(spdk_accel_submit_crc32cv, int, (struct spdk_io_channel *ch, uint32_
|
||||
struct iovec *iov,
|
||||
uint32_t iov_cnt, uint32_t seed, spdk_accel_completion_cb cb_fn, void *cb_arg), 0);
|
||||
|
||||
DEFINE_STUB_V(spdk_nvme_ctrlr_prepare_for_reset, (struct spdk_nvme_ctrlr *ctrlr));
|
||||
|
||||
struct ut_nvme_req {
|
||||
uint16_t opc;
|
||||
|
Loading…
Reference in New Issue
Block a user