aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/nd-core.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2015-05-01 13:34:01 -0400
committerDan Williams <dan.j.williams@intel.com>2015-06-24 21:24:10 -0400
commit1b40e09a1232de537b193fa1b6b3ef16d3a1e397 (patch)
tree48111c53fa3125b7d1f46d0f01b9448acbee62d0 /drivers/nvdimm/nd-core.h
parentbf9bccc14c05dae8caba29df6187c731710f5380 (diff)
libnvdimm: blk labels and namespace instantiation
A blk label set describes a namespace comprised of one or more discontiguous dpa ranges on a single dimm. They may alias with one or more pmem interleave sets that include the given dimm. This is the runtime/volatile configuration infrastructure for sysfs manipulation of 'alt_name', 'uuid', 'size', and 'sector_size'. A later patch will make these settings persistent by writing back the label(s). Unlike pmem namespaces, multiple blk namespaces can be created per region. Once a blk namespace has been created a new seed device (unconfigured child of a parent blk region) is instantiated. As long as a region has 'available_size' != 0 new child namespaces may be created. 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-core.h')
-rw-r--r--drivers/nvdimm/nd-core.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h
index c6c889292bab..22489555a6f1 100644
--- a/drivers/nvdimm/nd-core.h
+++ b/drivers/nvdimm/nd-core.h
@@ -17,6 +17,7 @@
17#include <linux/libnvdimm.h> 17#include <linux/libnvdimm.h>
18#include <linux/sizes.h> 18#include <linux/sizes.h>
19#include <linux/mutex.h> 19#include <linux/mutex.h>
20#include <linux/nd.h>
20 21
21extern struct list_head nvdimm_bus_list; 22extern struct list_head nvdimm_bus_list;
22extern struct mutex nvdimm_bus_list_mutex; 23extern struct mutex nvdimm_bus_list_mutex;
@@ -48,6 +49,8 @@ struct nvdimm_bus *walk_to_nvdimm_bus(struct device *nd_dev);
48int __init nvdimm_bus_init(void); 49int __init nvdimm_bus_init(void);
49void nvdimm_bus_exit(void); 50void nvdimm_bus_exit(void);
50void nd_region_probe_success(struct nvdimm_bus *nvdimm_bus, struct device *dev); 51void nd_region_probe_success(struct nvdimm_bus *nvdimm_bus, struct device *dev);
52struct nd_region;
53void nd_region_create_blk_seed(struct nd_region *nd_region);
51void nd_region_disable(struct nvdimm_bus *nvdimm_bus, struct device *dev); 54void nd_region_disable(struct nvdimm_bus *nvdimm_bus, struct device *dev);
52int nvdimm_bus_create_ndctl(struct nvdimm_bus *nvdimm_bus); 55int nvdimm_bus_create_ndctl(struct nvdimm_bus *nvdimm_bus);
53void nvdimm_bus_destroy_ndctl(struct nvdimm_bus *nvdimm_bus); 56void nvdimm_bus_destroy_ndctl(struct nvdimm_bus *nvdimm_bus);
@@ -64,8 +67,13 @@ struct nvdimm_drvdata;
64struct nd_mapping; 67struct nd_mapping;
65resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region, 68resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region,
66 struct nd_mapping *nd_mapping, resource_size_t *overlap); 69 struct nd_mapping *nd_mapping, resource_size_t *overlap);
70resource_size_t nd_blk_available_dpa(struct nd_mapping *nd_mapping);
67resource_size_t nd_region_available_dpa(struct nd_region *nd_region); 71resource_size_t nd_region_available_dpa(struct nd_region *nd_region);
68resource_size_t nvdimm_allocated_dpa(struct nvdimm_drvdata *ndd, 72resource_size_t nvdimm_allocated_dpa(struct nvdimm_drvdata *ndd,
69 struct nd_label_id *label_id); 73 struct nd_label_id *label_id);
74struct nd_mapping;
75struct resource *nsblk_add_resource(struct nd_region *nd_region,
76 struct nvdimm_drvdata *ndd, struct nd_namespace_blk *nsblk,
77 resource_size_t start);
70void get_ndd(struct nvdimm_drvdata *ndd); 78void get_ndd(struct nvdimm_drvdata *ndd);
71#endif /* __ND_CORE_H__ */ 79#endif /* __ND_CORE_H__ */