]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nvme/multipath: Fix multipath disabled naming collisions
authorKeith Busch <keith.busch@intel.com>
Tue, 21 Aug 2018 20:22:21 +0000 (16:22 -0400)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commite4b107a79103efc4e7c51e2b641500082c8af0b1
tree1c6535143682bf77ffb1782fecb2464277fe273a
parentdc871ce2b7ba5bf9f4b323cd1c0f9e77d7b251a1
nvme/multipath: Fix multipath disabled naming collisions

BugLink: https://bugs.launchpad.net/bugs/1789227
When CONFIG_NVME_MULTIPATH is set, but we're not using nvme to multipath,
namespaces with multiple paths were not creating unique names due to
reusing the same instance number from the namespace's head.

This patch fixes this by falling back to the non-multipath naming method
when the parameter disabled using multipath.

Reported-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry-picked from a785dbccd95c37606c720580714f5a7a8b3255f1)
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
[ kleber: fixed launchpad bug number ]
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/nvme/host/core.c
drivers/nvme/host/multipath.c
drivers/nvme/host/nvme.h