]> www.infradead.org Git - users/jedix/linux-maple.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 Duval <dan.duval@oracle.com>
Tue, 11 Oct 2016 18:37:54 +0000 (14:37 -0400)
commitedcbaa8f34e88db33965e4ba90192e6aa9990f1e
tree1d854ca4b32f675bec52111e159d3ae709fbddc0
parent626a9f83f55ae1d8f9e66b43da488ec04865fcde
libnvdimm: write blk label set

Orabug: 22913653

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>
(cherry picked from commit 0ba1c634892b3590779803a701bcb82e8c32cc7a)
Signed-off-by: Dan Duval <dan.duval@oracle.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