[PATCH 5/6] nvme: Export subsystems to /sys/class/nvme-subsys
Christoph Hellwig
hch at lst.de
Mon Oct 2 09:56:32 PDT 2017
On Mon, Oct 02, 2017 at 10:53:18AM -0600, Keith Busch wrote:
> 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.
>
Right now that's what we do. But if this actually shows up in the wild
in e.g. consumer products we'll have to come up with a work around and
just allow that case and skip matches for it. It would be a little ugly
but doable - once we expose the name in sysfs we are in deep trouble
with duplicate names.
> BTW, I just notice nvme_init_subsystem needs call nvme_put_subsystem in
> the invalid duplicate subnqn case.
We call __nvme_free_subsystem in that case, which should do the job.
More information about the Linux-nvme
mailing list