]> git.itanic.dy.fi Git - linux-stable/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)
commit075790ebba4a1eb297f9875e581b55c0382b1f3d
tree0b6119c4f7decc6b2809be19006b951e88e34f17
parentb00a726a9fd82ddd4c10344e46f0d371e1674303
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