Spdk/test
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
..
accel test/accel: add case for RPC accel_assign_opc 2023-01-06 16:13:52 +00:00
app llvm_vfio_fuzz: call spdk_thread_exit() 2022-11-23 08:22:04 +00:00
bdev test/bdev_raid: extended state checks 2023-01-09 12:39:19 +00:00
blobfs add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
blobstore add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
common pkgdep/git: add slirp devel package to Qemu installation 2023-01-12 08:14:18 +00:00
compress add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
cpp_headers update Intel copyright notices 2022-11-10 08:28:53 +00:00
dd add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
dma test/dma: call spdk_thread_exit() 2022-11-23 08:22:04 +00:00
dpdk_memory_utility add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
env add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
event Add SPDX header to various files 2022-11-29 08:27:51 +00:00
external_code accel: Add crypto operation support 2023-01-11 09:16:59 +00:00
ftl test/ftl: add cases line to cover RPC bdev_ftl_get_stats 2023-01-09 14:49:25 +00:00
fuzz fuzz/vhost: assign unique core masks to vhost and fuzz app 2022-12-07 09:21:13 +00:00
interrupt Add SPDX header to various files 2022-11-29 08:27:51 +00:00
ioat add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
iscsi_tgt test/iscsi_tgt: run most Calsoft tests serially 2022-12-23 09:27:48 +00:00
json_config module/iobuf: introduce iobuf module 2022-12-16 09:06:07 +00:00
lvol add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
make nvmf: Add copy command support 2022-11-30 08:50:06 +00:00
nvme misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
nvmf test/nvmf: group target and host tests 2023-01-11 09:17:34 +00:00
ocf Add SPDX header to various files 2022-11-29 08:27:51 +00:00
openstack add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
packaging add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
pmem add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
rpc lib/trace: add trace_get_info RPC 2022-12-05 09:50:38 +00:00
rpc_client add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
rpc_plugins autotest: Use rpc_cmd() for rpc plugin-based tests 2021-04-02 08:22:42 +00:00
scheduler Add SPDX header to various files 2022-11-29 08:27:51 +00:00
setup scripts/setup: Stop checking for broken uio_pci_generic driver 2022-12-14 08:03:17 +00:00
sma sma test: disable line wrapping for base64 2022-12-16 09:22:52 +00:00
spdkcli spdkcli: add uring bdev support 2022-12-20 09:17:07 +00:00
thread thread: test SPDK spinlocks in an application 2022-12-06 21:20:17 +00:00
unit bdev/nvme: Retry I/O to the same path if error is I/O error 2023-01-13 00:47:04 +00:00
vfio_user test/vfio_user: remove unnecessary VFIO_QEMU_BIN default value 2023-01-09 14:49:35 +00:00
vhost test/vhost: Don't remove QEMU's pidfile when terminating the process 2022-12-22 08:53:50 +00:00
vmd add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
Makefile update Intel copyright notices 2022-11-10 08:28:53 +00:00
spdk_cunit.h update Intel copyright notices 2022-11-10 08:28:53 +00:00