]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NVMe: Automatic namespace rescan
authorKeith Busch <keith.busch@intel.com>
Thu, 6 Aug 2015 21:43:00 +0000 (14:43 -0700)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 7 Aug 2015 18:21:07 +0000 (11:21 -0700)
commit992fb79843d9532dd3c2fabffa3be35fed7b229c
treeae1aafeb1678e1a7139a697de9af37d1b4117c30
parent6e7f8679bc7bb5113d7b1f24942c4df976da13d1
NVMe: Automatic namespace rescan

Namespaces may be dynamically allocated and deleted or attached and
detached. This has the driver rescan the device for namespace changes
after each device reset or namespace change asynchronous event.

There could potentially be many detached namespaces that we don't want
polluting /dev/ with unusable block handles, so this will delete disks
if the namespace is not active as indicated by the response from identify
namespace. This also skips adding the disk if no capacity is provisioned
to the namespace in the first place.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-core.c
include/linux/nvme.h
include/uapi/linux/nvme.h