From: Hannes Reinecke <hare@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>, Keith Busch <kbusch@kernel.org>,
linux-nvme@lists.infradead.org, Hannes Reinecke <hare@kernel.org>
Subject: [PATCH 3/4] nvme-multipath: always requeue I/O when updating the ANA state
Date: Fri, 6 Sep 2024 09:18:27 +0200 [thread overview]
Message-ID: <20240906071828.125614-4-hare@kernel.org> (raw)
In-Reply-To: <20240906071828.125614-1-hare@kernel.org>
When we've changed the ANA state we always need to kiek the requeue
list to ensure any pending I/O is retried with the latest changes.
Signed-off-by: Hannes Reinecke <hare@kernel.org>
---
drivers/nvme/host/multipath.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index f72c5a6a2d8e..143c9d64dfa7 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -734,9 +734,12 @@ static void nvme_update_ns_ana_state(struct nvme_ana_group_desc *desc,
* will reprocess the ANA log page in nvme_mpath_update() once the
* controller is ready.
*/
- if (nvme_state_is_live(ns->ana_state) &&
- nvme_ctrl_state(ns->ctrl) == NVME_CTRL_LIVE)
- nvme_mpath_set_live(ns);
+ if (nvme_ctrl_state(ns->ctrl) == NVME_CTRL_LIVE) {
+ if (nvme_state_is_live(ns->ana_state))
+ nvme_mpath_set_live(ns);
+ else
+ kblockd_schedule_work(&ns->head->requeue_work);
+ }
}
static int nvme_update_ana_state(struct nvme_ctrl *ctrl,
--
2.35.3
next prev parent reply other threads:[~2024-09-06 7:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 7:18 [PATCHv3 0/4] nvme: NSHEAD_DISK_LIVE fixes Hannes Reinecke
2024-09-06 7:18 ` [PATCH 1/4] nvme-multipath: fixup typo when clearing DISK_LIVE Hannes Reinecke
2024-09-06 7:29 ` Sagi Grimberg
2024-09-06 7:18 ` [PATCH 2/4] nvme-multipath: check for NVME_NSHEAD_DISK_LIVE when selecting paths Hannes Reinecke
2024-09-06 7:30 ` Sagi Grimberg
2024-09-06 7:18 ` Hannes Reinecke [this message]
2024-09-06 7:33 ` [PATCH 3/4] nvme-multipath: always requeue I/O when updating the ANA state Sagi Grimberg
2024-09-06 7:18 ` [PATCH 4/4] nvme: set 'failfast_expired' in nvme_remove_namespaces() Hannes Reinecke
2024-09-06 7:38 ` Sagi Grimberg
2024-09-06 8:32 ` Hannes Reinecke
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=20240906071828.125614-4-hare@kernel.org \
--to=hare@kernel.org \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--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