]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: Assign subsys instance from first ctrl
authorKeith Busch <kbusch@kernel.org>
Thu, 5 Sep 2019 16:33:54 +0000 (10:33 -0600)
committerSagi Grimberg <sagi@grimberg.me>
Thu, 12 Sep 2019 15:50:46 +0000 (08:50 -0700)
commit8555ffb883bb3339c3508ec2b99a44daa7f65956
treeeaab35e63c94ebf354deb53dd0acdc38cc3e6a5c
parenteca74325e123eb96f182940f194fa7523dc0149e
nvme: Assign subsys instance from first ctrl

The namespace disk names must be unique for the lifetime of the
subsystem. This was accomplished by using their parent subsystems'
instances which were allocated independently from the controllers
connected to that subsystem. This allowed name prefixes assigned to
namespaces to match a controller from an unrelated subsystem, and has
created confusion among users examining device nodes.

Ensure a namespace's subsystem instance never clashes with a controller
instance of another subsystem by transferring the instance ownership
to the parent subsystem from the first controller discovered in that
subsystem.

Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/core.c