diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-05-01 13:34:01 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-06-24 21:24:10 -0400 |
commit | 1b40e09a1232de537b193fa1b6b3ef16d3a1e397 (patch) | |
tree | 48111c53fa3125b7d1f46d0f01b9448acbee62d0 /drivers/nvdimm/nd-core.h | |
parent | bf9bccc14c05dae8caba29df6187c731710f5380 (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.h | 8 |
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 | ||
21 | extern struct list_head nvdimm_bus_list; | 22 | extern struct list_head nvdimm_bus_list; |
22 | extern struct mutex nvdimm_bus_list_mutex; | 23 | extern struct mutex nvdimm_bus_list_mutex; |
@@ -48,6 +49,8 @@ struct nvdimm_bus *walk_to_nvdimm_bus(struct device *nd_dev); | |||
48 | int __init nvdimm_bus_init(void); | 49 | int __init nvdimm_bus_init(void); |
49 | void nvdimm_bus_exit(void); | 50 | void nvdimm_bus_exit(void); |
50 | void nd_region_probe_success(struct nvdimm_bus *nvdimm_bus, struct device *dev); | 51 | void nd_region_probe_success(struct nvdimm_bus *nvdimm_bus, struct device *dev); |
52 | struct nd_region; | ||
53 | void nd_region_create_blk_seed(struct nd_region *nd_region); | ||
51 | void nd_region_disable(struct nvdimm_bus *nvdimm_bus, struct device *dev); | 54 | void nd_region_disable(struct nvdimm_bus *nvdimm_bus, struct device *dev); |
52 | int nvdimm_bus_create_ndctl(struct nvdimm_bus *nvdimm_bus); | 55 | int nvdimm_bus_create_ndctl(struct nvdimm_bus *nvdimm_bus); |
53 | void nvdimm_bus_destroy_ndctl(struct nvdimm_bus *nvdimm_bus); | 56 | void nvdimm_bus_destroy_ndctl(struct nvdimm_bus *nvdimm_bus); |
@@ -64,8 +67,13 @@ struct nvdimm_drvdata; | |||
64 | struct nd_mapping; | 67 | struct nd_mapping; |
65 | resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region, | 68 | resource_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); |
70 | resource_size_t nd_blk_available_dpa(struct nd_mapping *nd_mapping); | ||
67 | resource_size_t nd_region_available_dpa(struct nd_region *nd_region); | 71 | resource_size_t nd_region_available_dpa(struct nd_region *nd_region); |
68 | resource_size_t nvdimm_allocated_dpa(struct nvdimm_drvdata *ndd, | 72 | resource_size_t nvdimm_allocated_dpa(struct nvdimm_drvdata *ndd, |
69 | struct nd_label_id *label_id); | 73 | struct nd_label_id *label_id); |
74 | struct nd_mapping; | ||
75 | struct resource *nsblk_add_resource(struct nd_region *nd_region, | ||
76 | struct nvdimm_drvdata *ndd, struct nd_namespace_blk *nsblk, | ||
77 | resource_size_t start); | ||
70 | void get_ndd(struct nvdimm_drvdata *ndd); | 78 | void get_ndd(struct nvdimm_drvdata *ndd); |
71 | #endif /* __ND_CORE_H__ */ | 79 | #endif /* __ND_CORE_H__ */ |