+11
−5
Loading
As mentioned in the previous patch, it was confusing that a check function changed states. But, it is still desirable that the check and update are done under nvme_ctrlr->mutex. Hence, move clearing nvme_ctrlr->pending_failover from bdev_nvme_check_op_after_reset() to bdev_nvme_reset_ctrlr_complete() and bdev_nvme_disable_ctrlr_complete(). If reset failed, bdev_nvme_reset_ctrlr_complete() already has a special operation to try the next alternate trid. Hence, we can clear pending_resets at the top of bdev_nvme_reset_ctrlr_complete(). Before this patch, bdev_nvme_disable_ctrlr_complete() ignored OP_FAILOVER. This change will be helpful for clarification. Change-Id: Icc3ae4ee7a0ef94f50bdc4dae47f3692482196b9 Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/25862 Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Reviewed-by:
Ben Walker <ben@nvidia.com> Community-CI: Mellanox Build Bot Reviewed-by:
Jacek Kalwas <jacek.kalwas@nutanix.com>