Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] nvme: missed AENs during scanning
@ 2025-04-03  7:19 Hannes Reinecke
  2025-04-03  7:19 ` [PATCH 1/2] nvme: requeue namespace scan on missed AENs Hannes Reinecke
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Hannes Reinecke @ 2025-04-03  7:19 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

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



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

end of thread, other threads:[~2025-04-07 16:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox