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>
This commit is contained in:
parent
b281ebb817
commit
a5768aa887
3 changed files with 132 additions and 32 deletions
|
|
@ -92,6 +92,7 @@ struct nvme_dev {
|
|||
work_func_t reset_workfn;
|
||||
struct work_struct reset_work;
|
||||
struct work_struct probe_work;
|
||||
struct work_struct scan_work;
|
||||
char name[12];
|
||||
char serial[20];
|
||||
char model[40];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue