aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2017-04-25 18:32:01 -0400
committerJens Axboe <axboe@fb.com>2017-05-20 12:11:34 -0400
commit2952a879bacbfae8b03fd886754e64fe14b8041e (patch)
treea073545e38bb96561d2ce65401384fe9dbd157f8
parent85e6a6adf8de7f992e01d2c3c59d9875d658b276 (diff)
nvme-fc: stop queues on error detection
Per the recommendation by Sagi on: http://lists.infradead.org/pipermail/linux-nvme/2017-April/009261.html Rather than waiting for reset work thread to stop queues and abort the ios, immediately stop the queues on error detection. Reset thread will restop the queues (as it's called on other paths), but it does not appear to have a side effect. Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--drivers/nvme/host/fc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 912d457150d5..dca7165fabcf 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -1754,6 +1754,10 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg)
1754 dev_info(ctrl->ctrl.device, 1754 dev_info(ctrl->ctrl.device,
1755 "NVME-FC{%d}: resetting controller\n", ctrl->cnum); 1755 "NVME-FC{%d}: resetting controller\n", ctrl->cnum);
1756 1756
1757 /* stop the queues on error, cleanup is in reset thread */
1758 if (ctrl->queue_count > 1)
1759 nvme_stop_queues(&ctrl->ctrl);
1760
1757 if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_RECONNECTING)) { 1761 if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_RECONNECTING)) {
1758 dev_err(ctrl->ctrl.device, 1762 dev_err(ctrl->ctrl.device,
1759 "NVME-FC{%d}: error_recovery: Couldn't change state " 1763 "NVME-FC{%d}: error_recovery: Couldn't change state "