[PATCH 5/6] nvme: Export subsystems to /sys/class/nvme-subsys

Keith Busch keith.busch at intel.com
Mon Oct 2 09:53:18 PDT 2017


On Mon, Oct 02, 2017 at 06:18:08PM +0200, Christoph Hellwig wrote:
> On Mon, Oct 02, 2017 at 03:55:58PM +0200, Hannes Reinecke wrote:
> > Create a class for each subsystem to create a 'device' link
> > for each subsystem device.
> 
> I thought about this as it seems useful.  The only downside is that
> iff we run into subsystems with duplicate NQNs (or fake NQNs using
> MN/SN) we are in deep trouble once this is exposed in sysfs.
> 
> Keith was the one most concerned about that, so I'd like him to
> chime in.

The driver will unbind from the controller if it detects an unsupported
duplicate nvme subsystem. The same logic will prevent duplciate sysfs
entries in this patch, so I think we're okay from that standpoint.

My concern was the user can't query or fix the controller that has the
duplicate subsystem name since we unbind from it. Unbinding is probably
the right thing to do, though, so the confused subsystem can be fixed
when the user isolates it from the others.

BTW, I just notice nvme_init_subsystem needs call nvme_put_subsystem in
the invalid duplicate subnqn case.



More information about the Linux-nvme mailing list