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 0/2] nvme: missed AENs during scanning
Date: Thu, 3 Apr 2025 09:19:28 +0200 [thread overview]
Message-ID: <20250403071930.52154-1-hare@kernel.org> (raw)
Hi all,
I have been tracking down a long-standing issue from one of our partners
which had a test where namespaces have been remapped in quick succession.
The operation was to remove a namespace and add a new namespace at the same
NSID with a different UUID and different ANA group ID.
And that repeated in quick succession.
There had been several attempts to fix this ([1], [2], and the patch from
Keith in 1f021341eef4 ("nvme-multipath: defer partition scanning")), but
the test case continued to fail ending up with all paths in ANA Inaccessible.
Eventually it turned out that we're skipping NS Changed AENs; if namescan
scanning is active when we receive a NS Changed AEN we'll simply ignore it,
and do not re-read the namespace list as we should.
Additionally the NVMe base spec states (NVMe Base Specification v2.1, Figure
151 'Asynchonous Event Information - Notice': Asymmetric Namespace Access Change):
A controller shall not send this even if an Attached Namespace Attribute Changed
asynchronous event [ .. ] is sent for the same event.
so we need to re-read the ANA log page after we rescanned the namespace list to
update the ANA states of the new namespaces.
As usual, comments and reviews are welcome.
[1] https://lore.kernel.org/linux-nvme/20240902111548.41430-1-hare@kernel.org/
[2] https://lore.kernel.org/linux-nvme/20241007100134.21104-1-hare@kernel.org/
Hannes Reinecke (2):
nvme: requeue namespace scan on missed AENs
nvme: re-read ANA log page after ns scan completes
drivers/nvme/host/core.c | 9 +++++++++
1 file changed, 9 insertions(+)
--
2.35.3
next 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 Hannes Reinecke [this message]
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 ` [PATCH 2/2] nvme: re-read ANA log page after ns scan completes Hannes Reinecke
2025-04-03 14:55 ` 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-1-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 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.