bdev/nvme: Clear I/O path cache if a path whose ns is optimized is restored

If a path whose namespace is optimized is restored, the corresponding
I/O path cache should be cleared and the path should be chosen as the
optimal path.

This bug was found by a system test.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ibc3983dbff3418adb090a09df32c2a92a8910d05
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11004
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2022-01-10 08:15:50 +09:00 committed by Jim Harris
parent 3308bdf1b9
commit 6ac23b3e60

View File

@ -1222,6 +1222,8 @@ bdev_nvme_create_qpair(struct nvme_ctrlr_channel *ctrlr_ch)
ctrlr_ch->qpair = qpair;
_bdev_nvme_clear_io_path_cache(ctrlr_ch);
return 0;
err: