Skip to content

nvme: missed AENs during scanning

Hannes Reinecke linux-nvme 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2nvme: requeue namespace scan on missed AENsdrivers/nvme/host/core.c+4 -01 reply
2/2nvme: re-read ANA log page after ns scan completesdrivers/nvme/host/core.c+5 -05 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKeith Busch
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] nvme: missed AENs during scanning

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/[email protected]/
[2] https://lore.kernel.org/linux-nvme/[email protected]/

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(+)
Signature · 1 line
2.35.3