]> git.baikalelectronics.ru Git - kernel.git/commit
libnvdimm: write blk label set
authorDan Williams <dan.j.williams@intel.com>
Sat, 30 May 2015 16:35:36 +0000 (12:35 -0400)
committerDan Williams <dan.j.williams@intel.com>
Thu, 25 Jun 2015 01:24:10 +0000 (21:24 -0400)
commit4708970ff4c23e4c76af6449df9632eb36a1c0d2
treec23d1c952ec837729700b5e3c34cdb42a073b055
parent01529df6babdf992a018d79d32a6370854efbcf5
libnvdimm: write blk label set

After 'uuid', 'size', 'sector_size', and optionally 'alt_name' have been
set to valid values the labels on the dimm can be updated.  The
difference with the pmem case is that blk namespaces are limited to one
dimm and can cover discontiguous ranges in dpa space.

Also, after allocating label slots, it is useful for userspace to know
how many slots are left.  Export this information in sysfs.

Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Neil Brown <neilb@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/bus.c
drivers/nvdimm/dimm_devs.c
drivers/nvdimm/label.c
drivers/nvdimm/label.h
drivers/nvdimm/namespace_devs.c
drivers/nvdimm/nd-core.h