bdev/nvme: Delegate processing -EBUSY of bdev_nvme_reset() to its caller

bdev_nvme_submit_request() calls spdk_bdev_io_complete() with failed
if bdev_nvme_reset() returns negated rc other than -ENOMEM.

So let bdev_nvme_submit_request() process it.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2569634ff0f18fb433cb685de1366e43abf5a9fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7524
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Shuhei Matsumoto 2021-05-11 03:54:36 +09:00 committed by Tomasz Zawadzki
parent 5a6cd5b31c
commit 30d17fff30

View File

@ -595,9 +595,6 @@ bdev_nvme_reset(struct nvme_io_channel *nvme_ch, struct nvme_bdev_io *bio)
if (rc == 0) {
assert(nvme_ch->ctrlr->reset_bio == NULL);
nvme_ch->ctrlr->reset_bio = bio;
} else if (rc == -EBUSY) {
/* Don't bother resetting if the controller is in the process of being destructed. */
spdk_bdev_io_complete(bdev_io, SPDK_BDEV_IO_STATUS_FAILED);
} else if (rc == -EAGAIN) {
/*
* Reset call is queued only if it is from the app framework. This is on purpose so that