Spdk/module/bdev
Shuhei Matsumoto ae620784bd bdev/nvme: Retry I/O to the same path if error is I/O error
When an I/O gets an I/O error, the I/O path to which the I/O was
submitted may be still available. In this case, the I/O should be
retried to the same I/O path. However, a new I/O path was always
selected for an I/O retry.

For the active/passive policy, the same I/O path was selected naturally.
However, for the active/active policy, it was very likely that a
different I/O path was selected.

To use the same I/O path for an I/O retry, add a helper function
bdev_nvme_retry_io() into bdev_nvme_retry_ios() and replace
bdev_nvme_submit_request() by bdev_nvme_retry_io(). bdev_nvme_retry_io()
checks if nbdev_io->io_path is not NULL and is available. Then, call
_bdev_nvme_submit_request() if true, or call bdev_nvme_submit_request()
otherwise. For I/O path error, clear nbdev_io->io_path for
clarification. Add unit test to verify this change.

Linux kernel native NVMe multipath already takes this approach. Hence,
this change will be reasonable.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I7022aafd8b1cdd5830c4f743d64b080aa970cf8d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16015
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Richael <richael.zhuang@arm.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-13 00:47:04 +00:00
..
aio update Intel copyright notices 2022-11-10 08:28:53 +00:00
compress bdev/compress: limit operations performed on reduce_thread 2022-12-05 09:51:26 +00:00
crypto bdev/crypto: do not create mempool for session private data 2022-12-19 08:35:14 +00:00
daos bdev/daos: fix write of multiple iovs 2022-11-28 20:09:48 +00:00
delay update Intel copyright notices 2022-11-10 08:28:53 +00:00
error update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
gpt update Intel copyright notices 2022-11-10 08:28:53 +00:00
iscsi misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
lvol lvol: log when an lvstore is unloaded due to hotplug 2023-01-10 13:12:41 +00:00
malloc update Intel copyright notices 2022-11-10 08:28:53 +00:00
null update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme bdev/nvme: Retry I/O to the same path if error is I/O error 2023-01-13 00:47:04 +00:00
ocf bdev/ocf: Add runtime cache bdev flush support 2022-11-18 08:38:03 +00:00
passthru update Intel copyright notices 2022-11-10 08:28:53 +00:00
pmem update Intel copyright notices 2022-11-10 08:28:53 +00:00
raid raid5f: io metadata support 2023-01-11 09:08:52 +00:00
rbd bdev/rbd: limit operations performed on main thread 2022-12-05 09:51:26 +00:00
split update Intel copyright notices 2022-11-10 08:28:53 +00:00
uring bdev/uring: handle the out of resoruce from uring 2022-11-15 08:31:45 +00:00
virtio update Intel copyright notices 2022-11-10 08:28:53 +00:00
xnvme bdev_xnvme: Remove duplicate invocation of bdev_xnvme_destruct 2023-01-09 12:43:49 +00:00
zone_block update Intel copyright notices 2022-11-10 08:28:53 +00:00
Makefile configure: rename --with-reduce --with-vbdev-compress 2022-12-08 12:55:27 +00:00