diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-05-30 18:36:02 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-06-25 03:24:10 +0200 |
commit | f524bf271a5cf12a44253194abcf8b6688ff5b9d (patch) | |
tree | e477ae652183e73a6a3c6fc592046e255d2bfd15 /drivers/nvdimm/nd.h | |
parent | libnvdimm: blk labels and namespace instantiation (diff) | |
download | linux-f524bf271a5cf12a44253194abcf8b6688ff5b9d.tar.xz linux-f524bf271a5cf12a44253194abcf8b6688ff5b9d.zip |
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>
Diffstat (limited to 'drivers/nvdimm/nd.h')
-rw-r--r-- | drivers/nvdimm/nd.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h index 9b021b626202..bfa849617358 100644 --- a/drivers/nvdimm/nd.h +++ b/drivers/nvdimm/nd.h @@ -93,6 +93,7 @@ static inline unsigned nd_inc_seq(unsigned seq) return next[seq & 3]; } + enum nd_async_mode { ND_SYNC, ND_ASYNC, @@ -115,6 +116,8 @@ struct nvdimm; struct nvdimm_drvdata *to_ndd(struct nd_mapping *nd_mapping); int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd); int nvdimm_init_config_data(struct nvdimm_drvdata *ndd); +int nvdimm_set_config_data(struct nvdimm_drvdata *ndd, size_t offset, + void *buf, size_t len); struct nd_region *to_nd_region(struct device *dev); int nd_region_to_nstype(struct nd_region *nd_region); int nd_region_register_namespaces(struct nd_region *nd_region, int *err); |