[PATCH 0/2] nvme: missed AENs during scanning
Hannes Reinecke
hare at kernel.org
Thu Apr 3 00:19:28 PDT 2025
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
More information about the Linux-nvme
mailing list