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>