diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-06-25 04:20:04 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-06-25 04:20:04 -0400 |
commit | 8c2f7e8658df1d3b7cbfa62706941d14c715823a (patch) | |
tree | ac93512841113f4d1d7a38d788ec73bb21e2d605 /drivers/nvdimm/nd-core.h | |
parent | 0ba1c634892b3590779803a701bcb82e8c32cc7a (diff) |
libnvdimm: infrastructure for btt devices
NVDIMM namespaces, in addition to accepting "struct bio" based requests,
also have the capability to perform byte-aligned accesses. By default
only the bio/block interface is used. However, if another driver can
make effective use of the byte-aligned capability it can claim namespace
interface and use the byte-aligned ->rw_bytes() interface.
The BTT driver is the initial first consumer of this mechanism to allow
adding atomic sector update semantics to a pmem or blk namespace. This
patch is the sysfs infrastructure to allow configuring a BTT instance
for a namespace. Enabling that BTT and performing i/o is in a
subsequent patch.
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Neil Brown <neilb@suse.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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h index 78d6c51f4bac..5e6413964776 100644 --- a/drivers/nvdimm/nd-core.h +++ b/drivers/nvdimm/nd-core.h | |||
@@ -45,12 +45,14 @@ struct nvdimm { | |||
45 | bool is_nvdimm(struct device *dev); | 45 | bool is_nvdimm(struct device *dev); |
46 | bool is_nd_blk(struct device *dev); | 46 | bool is_nd_blk(struct device *dev); |
47 | bool is_nd_pmem(struct device *dev); | 47 | bool is_nd_pmem(struct device *dev); |
48 | struct nd_btt; | ||
48 | struct nvdimm_bus *walk_to_nvdimm_bus(struct device *nd_dev); | 49 | struct nvdimm_bus *walk_to_nvdimm_bus(struct device *nd_dev); |
49 | int __init nvdimm_bus_init(void); | 50 | int __init nvdimm_bus_init(void); |
50 | void nvdimm_bus_exit(void); | 51 | void nvdimm_bus_exit(void); |
51 | void nd_region_probe_success(struct nvdimm_bus *nvdimm_bus, struct device *dev); | 52 | void nd_region_probe_success(struct nvdimm_bus *nvdimm_bus, struct device *dev); |
52 | struct nd_region; | 53 | struct nd_region; |
53 | void nd_region_create_blk_seed(struct nd_region *nd_region); | 54 | void nd_region_create_blk_seed(struct nd_region *nd_region); |
55 | void nd_region_create_btt_seed(struct nd_region *nd_region); | ||
54 | void nd_region_disable(struct nvdimm_bus *nvdimm_bus, struct device *dev); | 56 | void nd_region_disable(struct nvdimm_bus *nvdimm_bus, struct device *dev); |
55 | int nvdimm_bus_create_ndctl(struct nvdimm_bus *nvdimm_bus); | 57 | int nvdimm_bus_create_ndctl(struct nvdimm_bus *nvdimm_bus); |
56 | void nvdimm_bus_destroy_ndctl(struct nvdimm_bus *nvdimm_bus); | 58 | void nvdimm_bus_destroy_ndctl(struct nvdimm_bus *nvdimm_bus); |
@@ -58,6 +60,7 @@ void nd_synchronize(void); | |||
58 | int nvdimm_bus_register_dimms(struct nvdimm_bus *nvdimm_bus); | 60 | int nvdimm_bus_register_dimms(struct nvdimm_bus *nvdimm_bus); |
59 | int nvdimm_bus_register_regions(struct nvdimm_bus *nvdimm_bus); | 61 | int nvdimm_bus_register_regions(struct nvdimm_bus *nvdimm_bus); |
60 | int nvdimm_bus_init_interleave_sets(struct nvdimm_bus *nvdimm_bus); | 62 | int nvdimm_bus_init_interleave_sets(struct nvdimm_bus *nvdimm_bus); |
63 | void __nd_device_register(struct device *dev); | ||
61 | int nd_match_dimm(struct device *dev, void *data); | 64 | int nd_match_dimm(struct device *dev, void *data); |
62 | struct nd_label_id; | 65 | struct nd_label_id; |
63 | char *nd_label_gen_id(struct nd_label_id *label_id, u8 *uuid, u32 flags); | 66 | char *nd_label_gen_id(struct nd_label_id *label_id, u8 *uuid, u32 flags); |
@@ -77,4 +80,5 @@ struct resource *nsblk_add_resource(struct nd_region *nd_region, | |||
77 | resource_size_t start); | 80 | resource_size_t start); |
78 | int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd); | 81 | int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd); |
79 | void get_ndd(struct nvdimm_drvdata *ndd); | 82 | void get_ndd(struct nvdimm_drvdata *ndd); |
83 | resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns); | ||
80 | #endif /* __ND_CORE_H__ */ | 84 | #endif /* __ND_CORE_H__ */ |