[PATCH 2/2] nvme: re-read ANA log page after ns scan completes
Hannes Reinecke
hare at suse.de
Thu Apr 3 08:32:59 PDT 2025
On 4/3/25 16:55, Keith Busch wrote:
> On Thu, Apr 03, 2025 at 09:19:30AM +0200, Hannes Reinecke wrote:
>> 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.
>
> Worst case we might check a log page that hasn't changed. Rescans should
> be rare, so I guess it's fine. But I'm not sure why scanning might cause
> an ANA AEN to be missed. ?
>
Well, it's not that we're _missing_ AENs here.
As per quoted spec ANA change events are not sent if there had been
an event (on the controller) which would have caused both an ANA change
event and an NS changed AEN to be sent.
So any NS changed event really needs to be treated as a combination of
NS changed _and_ ANA changed, and after each namespace rescan we need
to re-read the ANA log page.
Sigh.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list