Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] nvme-rdma: Allow DELETING state change failure in error_recovery
@ 2018-03-20 11:07 Nitzan Carmi
  2018-03-20 11:07 ` [PATCH 2/2] nvme: Add .stop_ctrl to nvme ctrl ops Nitzan Carmi
  2018-03-20 11:30 ` [PATCH 1/2] nvme-rdma: Allow DELETING state change failure in error_recovery Sagi Grimberg
  0 siblings, 2 replies; 4+ messages in thread
From: Nitzan Carmi @ 2018-03-20 11:07 UTC (permalink / raw)


While error recovery is ongoing, it is OK to move
ctrl to DELETING state (from concurrent delete_work).
Thus we don't need a warning for that case.

Signed-off-by: Nitzan Carmi <nitzanc at mellanox.com>
Reviewed-by: Max Gurtovoy <maxg at mellanox.com>
---
 drivers/nvme/host/rdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 64a4b8c..987691c 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -978,8 +978,8 @@ static void nvme_rdma_error_recovery_work(struct work_struct *work)
 	nvme_start_queues(&ctrl->ctrl);
 
 	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're in DELETING state */
+		WARN_ON_ONCE(ctrl->ctrl.state != NVME_CTRL_DELETING);
 		return;
 	}
 
-- 
1.8.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-20 22:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-20 11:07 [PATCH 1/2] nvme-rdma: Allow DELETING state change failure in error_recovery Nitzan Carmi
2018-03-20 11:07 ` [PATCH 2/2] nvme: Add .stop_ctrl to nvme ctrl ops Nitzan Carmi
2018-03-20 11:30 ` [PATCH 1/2] nvme-rdma: Allow DELETING state change failure in error_recovery Sagi Grimberg
2018-03-20 22:11   ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox