+19
−21
Loading
nbdev_ch->current_io_path is NULL at initialization. bdev_nvme_find_io_path() calls _bdev_nvme_find_io_path() if nbdev_ch->current_io_path is NULL. If there is no optimized path, nbdev_ch->current_io_path is not filled. Hence, as long as there is no optimized path, bdev_nvme_find_next_io_path() is never called. However, bdev_nvme_find_next_io_path() fills nbdev_ch->current_io_path even if the found path is non optimized. This is a contradiction and a bug. To fix this bug, as a preparation, refactor _bdev_nvme_find_io_path() to cnosolidate bdev_nvme_find_next_io_path() and _bdev_nvme_find_io_path() into a single function because bdev_nvme_find_next_io_path() and _bdev_nvme_find_io_path() were almost identical. Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I7bc4107ce6ae6f116dee03c9bb67d9e4061ce775 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16188 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Richael <richael.zhuang@arm.com>