bdev/nvme: Inline bdev_nvme_reset_io_complete() into bdev_nvme_reset_complete()
The current nvme_ctrlr will be registered as io_device even when multipath is supported. Then we do not have to differentiate completion processing between reset from bdev_io and internal reset. Hence inline bdev_nvme_reset_io_complete() into bdev_nvme_reset_complete(). Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ife2c4c93d423da3953174ac860485a6e095a28bd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8587 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
c213f1b452
commit
3a243b7f38
@ -499,20 +499,6 @@ bdev_nvme_abort_pending_resets(struct spdk_io_channel_iter *i)
|
||||
spdk_for_each_channel_continue(i, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
bdev_nvme_reset_io_complete(struct nvme_ctrlr *nvme_ctrlr,
|
||||
struct nvme_bdev_io *bio, int rc)
|
||||
{
|
||||
bdev_nvme_io_complete(bio, rc);
|
||||
|
||||
/* Make sure we clear any pending resets before returning. */
|
||||
spdk_for_each_channel(nvme_ctrlr,
|
||||
rc == 0 ? bdev_nvme_complete_pending_resets :
|
||||
bdev_nvme_abort_pending_resets,
|
||||
nvme_ctrlr,
|
||||
bdev_nvme_check_pending_destruct);
|
||||
}
|
||||
|
||||
static void
|
||||
bdev_nvme_reset_complete(struct nvme_ctrlr *nvme_ctrlr, int rc)
|
||||
{
|
||||
@ -545,15 +531,15 @@ bdev_nvme_reset_complete(struct nvme_ctrlr *nvme_ctrlr, int rc)
|
||||
pthread_mutex_unlock(&nvme_ctrlr->mutex);
|
||||
|
||||
if (bio) {
|
||||
bdev_nvme_reset_io_complete(nvme_ctrlr, bio, rc);
|
||||
} else {
|
||||
/* Make sure we clear any pending resets before returning. */
|
||||
spdk_for_each_channel(nvme_ctrlr,
|
||||
rc == 0 ? bdev_nvme_complete_pending_resets :
|
||||
bdev_nvme_abort_pending_resets,
|
||||
nvme_ctrlr,
|
||||
bdev_nvme_check_pending_destruct);
|
||||
bdev_nvme_io_complete(bio, rc);
|
||||
}
|
||||
|
||||
/* Make sure we clear any pending resets before returning. */
|
||||
spdk_for_each_channel(nvme_ctrlr,
|
||||
rc == 0 ? bdev_nvme_complete_pending_resets :
|
||||
bdev_nvme_abort_pending_resets,
|
||||
nvme_ctrlr,
|
||||
bdev_nvme_check_pending_destruct);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user