All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme_fc: stop queues on error detection
@ 2017-04-25 22:32 jsmart2021
  2017-05-08  9:26 ` Johannes Thumshirn
  2017-05-10 17:24 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: jsmart2021 @ 2017-04-25 22:32 UTC (permalink / raw)


From: James Smart <jsmart2021@gmail.com>

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 at broadcom.com>
---
 drivers/nvme/host/fc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 4d4b902..16a658c 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -1751,6 +1751,10 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg)
 	dev_info(ctrl->ctrl.device,
 		"NVME-FC{%d}: resetting controller\n", ctrl->cnum);
 
+	/* stop the queues on error, cleanup is in reset thread */
+	if (ctrl->queue_count > 1)
+		nvme_stop_queues(&ctrl->ctrl);
+
 	if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_RECONNECTING)) {
 		dev_err(ctrl->ctrl.device,
 			"NVME-FC{%d}: error_recovery: Couldn't change state "
-- 
2.9.3

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

* [PATCH] nvme_fc: stop queues on error detection
  2017-04-25 22:32 [PATCH] nvme_fc: stop queues on error detection jsmart2021
@ 2017-05-08  9:26 ` Johannes Thumshirn
  2017-05-10 17:24 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2017-05-08  9:26 UTC (permalink / raw)


On 04/26/2017 12:32 AM, jsmart2021@gmail.com wrote:
> From: James Smart <jsmart2021 at gmail.com>
> 
> 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 at broadcom.com>
> ---

Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>


-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

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

* [PATCH] nvme_fc: stop queues on error detection
  2017-04-25 22:32 [PATCH] nvme_fc: stop queues on error detection jsmart2021
  2017-05-08  9:26 ` Johannes Thumshirn
@ 2017-05-10 17:24 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2017-05-10 17:24 UTC (permalink / raw)


Thanks,

applied to nvme-4.12.

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

end of thread, other threads:[~2017-05-10 17:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-25 22:32 [PATCH] nvme_fc: stop queues on error detection jsmart2021
2017-05-08  9:26 ` Johannes Thumshirn
2017-05-10 17:24 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.