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

Keith Busch kbusch at kernel.org
Wed Dec 9 12:39:36 EST 2020


On Wed, Dec 09, 2020 at 06:04:29PM +0100, Hannes Reinecke wrote:
> On 12/9/20 5:19 PM, Keith Busch wrote:
> > On Wed, Dec 09, 2020 at 05:02:05PM +0100, Hannes Reinecke wrote:
> > > On 12/9/20 4:53 PM, Keith Busch wrote:
> > > > On Wed, Dec 09, 2020 at 03:20:57PM +0000, Knight, Frederick wrote:
> > > > > When a namespace is created (and contained in an ANA Group), the act
> > > > > of creating that namespace results in a change to the ANA Log page -
> > > > > therefore AEN.
> > > > 
> > > > That is wrong: creating a namespace doesn't do anything to the ANA log.
> > > > Only attached namespaces appear in the log. Creating a namespace
> > > > doesn't result in automatically attaching it to any controller.
> > > > 
> > > > You are thinking of Namespace Attach from section 5.19, and the spec
> > > > doesn't define any special exceptions for events resulting from *that*
> > > > command, which is also the command that triggered this thread.
> > > > 
> > > Actually, no, we're not thinking about 'Namespace Attach'.
> > 
> > This patch is the result from an Attach command, otherwise the host
> > driver wouldn't have found an unknown ANA group for a new namespace
> > during the rescan.
> > 
> > > This is a normal namespace creation on the controller side.
> > > 
> > > I do agree that 'Namespace Attach' would have different constrains and rules
> > > under which AENs will be sent, but this is not what our initial use-case was
> > > about.
> > 
> > The use case in this patch is about getting the host to recognize the
> > ANA group of a newly attached namespace. If you stop at namespace
> > creation, then this patch doesn't do anything.
> > 
> Now you got me confused.
> Of course the namespace is attached to a controller, but this is _not_ the
> result of a 'namespace attach' command from the host.
> If that's what you imply.
> Not sure, though; as said, I'm confused now.
> 
> The use-case I'm trying to describe is that the admin on the storage array
> is creating a namespace and attaching it to an existing subsystem,
> completely without interaction from the host. It just so happens that this
> new namespace has a different ANA group than the existing namespaces in this
> subsystem.
> Then the array has to notify the host about this.
> And the whole discussion is about which AENs this controller/storage array
> should be sending.

Fred keeps saying the spec's rules for NVMe's namespace create command
from section 5.20 allow him to not send events, but it turns out you're
not even using this command? Why would the spec's defined behavior apply
to this proprietary use case?



More information about the Linux-nvme mailing list