aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libnvdimm.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-09-19 16:38:50 -0700
committerDan Williams <dan.j.williams@intel.com>2016-09-30 19:13:42 -0700
commit44c462eb9e19dfa089b454271dd2dff5eaf1ad6d (patch)
tree4973b6ac54b002b340e1c5a863a982048b2f7c1f /include/linux/libnvdimm.h
parentlibnvdimm: clear the internal poison_list when clearing badblocks (diff)
downloadlinux-dev-44c462eb9e19dfa089b454271dd2dff5eaf1ad6d.tar.xz
linux-dev-44c462eb9e19dfa089b454271dd2dff5eaf1ad6d.zip
libnvdimm, region: move region-mapping input-paramters to nd_mapping_desc
Before we add more libnvdimm-private fields to nd_mapping make it clear which parameters are input vs libnvdimm internals. Use struct nd_mapping_desc instead of struct nd_mapping in nd_region_desc and make struct nd_mapping private to libnvdimm. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/libnvdimm.h')
-rw-r--r--include/linux/libnvdimm.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h
index 4a5f8c51f2a5..f4947fda11e7 100644
--- a/include/linux/libnvdimm.h
+++ b/include/linux/libnvdimm.h
@@ -50,23 +50,6 @@ typedef int (*ndctl_fn)(struct nvdimm_bus_descriptor *nd_desc,
struct nvdimm *nvdimm, unsigned int cmd, void *buf,
unsigned int buf_len, int *cmd_rc);
-struct nd_namespace_label;
-struct nvdimm_drvdata;
-
-struct nd_mapping {
- struct nvdimm *nvdimm;
- struct nd_namespace_label **labels;
- u64 start;
- u64 size;
- /*
- * @ndd is for private use at region enable / disable time for
- * get_ndd() + put_ndd(), all other nd_mapping to ndd
- * conversions use to_ndd() which respects enabled state of the
- * nvdimm.
- */
- struct nvdimm_drvdata *ndd;
-};
-
struct nvdimm_bus_descriptor {
const struct attribute_group **attr_groups;
unsigned long cmd_mask;
@@ -89,9 +72,15 @@ struct nd_interleave_set {
u64 cookie;
};
+struct nd_mapping_desc {
+ struct nvdimm *nvdimm;
+ u64 start;
+ u64 size;
+};
+
struct nd_region_desc {
struct resource *res;
- struct nd_mapping *nd_mapping;
+ struct nd_mapping_desc *mapping;
u16 num_mappings;
const struct attribute_group **attr_groups;
struct nd_interleave_set *nd_set;