nvme: Don't allow to reset a reconnecting controller
authorSagi Grimberg <sagi@grimberg.me>
Thu, 4 May 2017 10:33:12 +0000 (13:33 +0300)
committerChristoph Hellwig <hch@lst.de>
Thu, 15 Jun 2017 12:28:22 +0000 (14:28 +0200)
The reset operation is guaranteed to fail for all scenarios
but the esoteric case where in the last reconnect attempt
concurrent with the reset we happen to successfully reconnect.

We just deny initiating a reset if we are reconnecting.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c

index 767bcc6caae0ceff8369774fb1c68d2133e7ab65..6d53094f4b8e52f201e64de868f408c6191b7eca 100644 (file)
@@ -157,7 +157,6 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
                switch (old_state) {
                case NVME_CTRL_NEW:
                case NVME_CTRL_LIVE:
-               case NVME_CTRL_RECONNECTING:
                        changed = true;
                        /* FALLTHRU */
                default: