NVMe: Expose ns wwid through single sysfs entry for-4.6/drivers-merged
authorKeith Busch <keith.busch@intel.com>
Thu, 18 Feb 2016 16:57:48 +0000 (09:57 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 16 Mar 2016 14:46:31 +0000 (07:46 -0700)
commit4a85791d5df10645d98c1f7bd823d490f4dc1bb9
tree82dad7f746ca9f7115e0e2fda8b665b5e7dcca30
parent807319de61a9995939ebb861d9e4b2c785918fc2
NVMe: Expose ns wwid through single sysfs entry

The method to uniquely identify a namespace depends on the controller's
specification revision level and implemented capabilities. This patch
has the driver figure this out and exports the unique string through a
single 'wwid' attribute so the user doesn't have this burden.

The longest namespace unique identifier is used if available. If not
available, the driver will concat the controller's vendor, serial,
and model with the namespace ID. The specification provides this as a
unique indentifier.

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