]> git.baikalelectronics.ru Git - kernel.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 Williams <dan.j.williams@intel.com>
Thu, 25 Jun 2015 01:24:10 +0000 (21:24 -0400)
commit01529df6babdf992a018d79d32a6370854efbcf5
treee477ae652183e73a6a3c6fc592046e255d2bfd15
parentdcc9fe6565627cf370f46ea65b914705f552ab38
libnvdimm: write pmem label set

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>
drivers/nvdimm/dimm_devs.c
drivers/nvdimm/label.c
drivers/nvdimm/label.h
drivers/nvdimm/namespace_devs.c
drivers/nvdimm/nd.h