]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: Use IDA for namespace disk naming
authorKeith Busch <keith.busch@intel.com>
Wed, 24 Feb 2016 16:15:53 +0000 (09:15 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 3 Mar 2016 21:42:49 +0000 (14:42 -0700)
commit7d86efa30bcbc4e23bfc49e330988ddea118abf0
tree0b6119c4f7decc6b2809be19006b951e88e34f17
parentf4d004d786e5b4e713df58555d766c77719f9be1
NVMe: Use IDA for namespace disk naming

A namespace may be detached from a controller, but a user may be holding
a reference to it. Attaching a new namespace with the same NSID will create
duplicate names when using the NSID to name the disk.

This patch uses an IDA that is released only when the last reference is
released instead of using the namespace ID.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h