Spdk/module/bdev
Shuhei Matsumoto 22b77a3c80 bdev/nvme: Set preferred I/O path in multipath mode
If we specify a preferred path manually for each NVMe bdev, we will
be able to realize a simple static load balancing and make the failover
more controllable in the multipath mode.

The idea is to move I/O path to the NVMe-oF controller to the head of
the list and then clear the I/O path cache for each NVMe bdev channel.
We can set the I/O path to the I/O path cache directly but it must be
conditional and make the code very complex. Hence, let find_io_path() do
that.

However, a NVMe bdev channel may be acquired after setting the preferred
path. To cover such case, sort the nvme_ns list of the NVMe bdev too.

This feature supports only multipath mode. The NVMe bdev module supports
failover mode too. However, to support the latter, the new RPC needs to
have trid as parameters and the code and the usage will be come very
complex. Add a note for such limitation.

To verify one by one exactly, add unit test.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ia51c74f530d6d7dc1f73d5b65f854967363e76b0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12262
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: <tanl12@chinatelecom.cn>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-05-05 07:11:24 +00:00
..
aio bdev/aio: Use bdev_open_ext() for rescan instead of bdev_get_by_name() 2022-04-04 09:57:43 +00:00
compress bdev/compress: Update error handling in IO submission path 2022-03-31 09:34:52 +00:00
crypto module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
delay bdev/delay: Find delay_bdev directly from g_delay_node list 2022-04-04 09:57:43 +00:00
error bdev/error: Use bdev_open_ext() to inject error instead of bdev_get_by_name() 2022-04-04 09:57:43 +00:00
ftl module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
gpt vbdev_gpt: Report memory domains 2022-04-04 09:57:56 +00:00
iscsi module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
lvol so_ver: increase all major versions 2022-01-31 15:29:56 +00:00
malloc module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
null bdev/null: Use bdev_open_ext() for resize instead of bdev_get_by_name() 2022-04-04 09:57:43 +00:00
nvme bdev/nvme: Set preferred I/O path in multipath mode 2022-05-05 07:11:24 +00:00
ocf ocf/rpc: Add RPC method to manage sequential cutoff 2022-04-01 08:31:32 +00:00
passthru module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
pmem bdev/pmem: add support for IO_TYPE_FLUSH 2022-04-11 07:43:23 +00:00
raid bdev/raid: stop the raid bdev in raid_bdev_destruct 2022-04-13 08:33:19 +00:00
rbd bdev/rbd: Use bdev_open_ext() for resize instead of bdev_get_by_name() 2022-04-04 09:57:43 +00:00
split bdev/split: Use bdev_open_ext() for creation instead of bdev_get_by_name() 2022-04-04 09:57:43 +00:00
uring module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
virtio module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
zone_block module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
Makefile bdev: move bdev_rpc library contents 2020-09-25 11:43:42 +00:00