[PATCH] nvme-core: update NS Attr Changed AEN handling for ANA group

Keith Busch kbusch at kernel.org
Tue Dec 8 12:40:33 EST 2020


On Tue, Dec 08, 2020 at 03:21:16PM +0000, Knight, Frederick wrote:
> It is clear that the NS attribute change is required:
> Namespace Attribute Changed: Indicates a change to one or both of the following:
> •	... ; or
> •	the Namespace List returned when the Identify command is issued with the CNS field set to 02h.
> 
> It seems clear to me that the ANA change IS prohibited:
>
> Asymmetric Namespace Access Change: The Asymmetric Namespace Access
> information (refer to section 5.14.1.12) related to an ANA Group that
> contains namespaces attached to this controller has changed (e.g., an
> ANA state has changed, an ANAGRPID has changed). The current
> Asymmetric Namespace Access information for attached namespaces is
> indicated in the Asymmetric Namespace Access log page (refer to
> section 5.14.1.12).
> 
> We CANNOT deliver this AEN unless it is related to an ANA group that
> contains namespaces attached to this controller.  The creating of a
> new ANA group (which therefore has no namespaces) does not meet the
> criteria of "containing namespaces attached to this controller".  So
> there are 2 possible orders - 1) the ANA group is created before the
> namespace, or 2) the namespace is created before the namespace.  If
> the Group is created before the namespace, then there are NO attached
> namespaces in that (brand new) ANA group, therefore, we are prohibited
> from sending the AEN.  If the namespace is created before the ANA
> group, then we hit the next language, that prohibits sending the ANA
> changed AEN because is it "due to the creation of a namespace".

It can't be "1". If you make a group without a namespace, the host
couldn't read it anyway because the log only contains entries for groups
with namespaces attached to that controller.

As for "2", my understanding from reading this is that it refers to
suppressing the ANA event when a change in the "Number of NSID Values"
within a group occurs rather than a change in "Number of ANA Group
Descriptors" field.

As for text supporting it, we have 8.20.3.6:

  an Asymmetric Namespace Access Change Notice shall be sent by the
  controllers where the change occurred:
   ...
  c) upon entry to the following ANA states:

Your scenario has an ANA group that previously didn't exist entering a
state, so you shall send the event.



More information about the Linux-nvme mailing list