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 2/2] nvme: re-read ANA log page after ns scan completes
Date: Thu, 3 Apr 2025 09:19:30 +0200 [thread overview]
Message-ID: <20250403071930.52154-3-hare@kernel.org> (raw)
In-Reply-To: <20250403071930.52154-1-hare@kernel.org>
When scanning for new namespaces we might have missed an ANA AEN,
so we should always re-read the ANA log page after scanning to ensure
we don't miss updates there.
Signed-off-by: Hannes Reinecke <hare@kernel.org>
---
drivers/nvme/host/core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 70f9c2d2b113..6197de34c3c8 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -4296,6 +4296,11 @@ static void nvme_scan_work(struct work_struct *work)
/* Requeue if we have missed AENs */
if (test_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events))
nvme_queue_scan(ctrl);
+#if CONFIG_NVME_MULTIPATH
+ else
+ /* Re-read the ANA log page to not miss updates */
+ queue_work(nvme_wq, &ctrl->ana_work);
+#endif
}
/*
--
2.35.3
next prev parent reply other threads:[~2025-04-03 7:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 7:19 [PATCH 0/2] nvme: missed AENs during scanning Hannes Reinecke
2025-04-03 7:19 ` [PATCH 1/2] nvme: requeue namespace scan on missed AENs Hannes Reinecke
2025-04-05 23:01 ` Keith Busch
2025-04-03 7:19 ` Hannes Reinecke [this message]
2025-04-03 14:55 ` [PATCH 2/2] nvme: re-read ANA log page after ns scan completes Keith Busch
2025-04-03 15:32 ` Hannes Reinecke
2025-04-03 15:37 ` Keith Busch
2025-04-03 15:52 ` Hannes Reinecke
2025-04-05 23:02 ` Keith Busch
2025-04-07 14:32 ` [PATCH 0/2] nvme: missed AENs during scanning 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=20250403071930.52154-3-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