]> www.infradead.org Git - users/jedix/linux-maple.git/commit
libnvdimm: write pmem label set
authorDan Williams <dan.j.williams@intel.com>
Sat, 30 May 2015 16:36:02 +0000 (12:36 -0400)
committerDan Duval <dan.duval@oracle.com>
Tue, 11 Oct 2016 18:37:38 +0000 (14:37 -0400)
commit626a9f83f55ae1d8f9e66b43da488ec04865fcde
tree8be097afd7de54fc9f4452c4a8325f901f490691
parentb9ca4b175aab32f84422807a50e07760dcbe4dc6
libnvdimm: write pmem label set

Orabug: 22913653

After 'uuid', 'size', and optionally 'alt_name' have been set to valid
values the labels on the dimms can be updated.

Write procedure is:
1/ Allocate and write new labels in the "next" index
2/ Free the old labels in the working copy
3/ Write the bitmap and the label space on the dimm
4/ Write the index to make the update valid

Label ranges directly mirror the dpa resource values for the given
label_id of the namespace.

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 f524bf271a5cf12a44253194abcf8b6688ff5b9d)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/nvdimm/dimm_devs.c
drivers/nvdimm/label.c
drivers/nvdimm/label.h
drivers/nvdimm/namespace_devs.c
drivers/nvdimm/nd.h