]> git.baikalelectronics.ru Git - kernel.git/commit
nvme/multipath: Fix multipath disabled naming collisions
authorKeith Busch <keith.busch@intel.com>
Thu, 26 Apr 2018 20:22:41 +0000 (14:22 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 3 May 2018 15:37:50 +0000 (09:37 -0600)
commitf3fd20386031d1c70d3a5d753753a707dfb6ed16
tree7c361bfe2431b66646e50570137098ecfae0f36f
parenta94e5e96adbfe1ac90bede74654a827a5f2b04ee
nvme/multipath: Fix multipath disabled naming collisions

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>
drivers/nvme/host/core.c
drivers/nvme/host/multipath.c
drivers/nvme/host/nvme.h