Skip to content
Snippets Groups Projects
Commit 7d574b4c authored by Keith Busch's avatar Keith Busch Committed by Xibo.Wang
Browse files

nvme: Assign subsys instance from first ctrl

mainline inclusion
from mainline-v5.4
commit 733e4b69
category: bugfix
bugzilla:https://gitee.com/openeuler/kernel/issues/I5986O


CVE: NA

--------------------------------

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: default avatarLogan Gunthorpe <logang@deltatee.com>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMinwoo Im <minwoo.im@samsung.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Reviewed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarXibo.Wang <wangxb12@chinatelecom.cn>
parent e921a80d
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment