From: Keith Busch <kbusch@meta.com>
To: <linux-nvme@lists.infradead.org>, <hch@lst.de>,
<sagi@grimberg.me>, <ming.lei@redhat.com>
Cc: <brookxu.cn@gmail.com>, Keith Busch <kbusch@kernel.org>
Subject: [PATCH 2/3] nvme: sync timeout work on failed reset
Date: Wed, 28 Jun 2023 07:58:13 -0700 [thread overview]
Message-ID: <20230628145814.1068653-2-kbusch@meta.com> (raw)
In-Reply-To: <20230628145814.1068653-1-kbusch@meta.com>
From: Keith Busch <kbusch@kernel.org>
Timeouts during reset will set the controller for failure, preventing
the state change to LIVE. Ensure all timeout work is synced after the
controller disabling completes so we don't have any other tasks messing
with any namespace request_queues.
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
drivers/nvme/host/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 8eaa954aa6ed4..bfeadecf9e15b 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2777,6 +2777,7 @@ static void nvme_reset_work(struct work_struct *work)
result);
nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DELETING);
nvme_dev_disable(dev, true);
+ nvme_sync_queues(&dev->ctrl);
nvme_mark_namespaces_dead(&dev->ctrl);
nvme_unquiesce_io_queues(&dev->ctrl);
nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DEAD);
--
2.34.1
next prev parent reply other threads:[~2023-06-28 14:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 14:58 [PATCH 1/3] nvme: ensure unquiesce on teardown Keith Busch
2023-06-28 14:58 ` Keith Busch [this message]
2023-06-29 5:22 ` [PATCH 2/3] nvme: sync timeout work on failed reset Christoph Hellwig
2023-06-28 14:58 ` [PATCH 3/3] nvme: disable controller on reset state failure Keith Busch
2023-06-29 5:23 ` Christoph Hellwig
2023-06-29 5:22 ` [PATCH 1/3] nvme: ensure unquiesce on teardown Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230628145814.1068653-2-kbusch@meta.com \
--to=kbusch@meta.com \
--cc=brookxu.cn@gmail.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=ming.lei@redhat.com \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox