[PATCH 08/10] nvme-rdma: update WARN_ON condition during reset
Max Gurtovoy
mgurtovoy at nvidia.com
Wed Oct 20 03:38:42 PDT 2021
Changing state to NVME_CTRL_CONNECTING might fail if we started ctrl
delete procedure already. This is allowed in NVMe/TCP transport, so no
reason to have different WARN_ON_ONCE condition for NVMe/RDMA.
Signed-off-by: Max Gurtovoy <mgurtovoy at nvidia.com>
---
drivers/nvme/host/rdma.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 8e1e8c8c8a0d..f4eeafee05e5 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -2183,8 +2183,9 @@ static void nvme_rdma_reset_ctrl_work(struct work_struct *work)
nvme_rdma_shutdown_ctrl(ctrl, false);
if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
- /* state change failure should never happen */
- WARN_ON_ONCE(1);
+ /* state change failure is ok if we started ctrl delete */
+ WARN_ON_ONCE(ctrl->ctrl.state != NVME_CTRL_DELETING &&
+ ctrl->ctrl.state != NVME_CTRL_DELETING_NOIO);
return;
}
--
2.18.1
More information about the Linux-nvme
mailing list