diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-02-18 10:29:49 -0800 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-03-05 12:24:06 -0800 |
commit | 719994660c249a086a7493205c7f1562e30c38cb (patch) | |
tree | c45b589901ab8e779e8b6b423c63ba45475991fc /include | |
parent | 5faecf4eb0d7d67e809a4bc9059c764c27670832 (diff) |
libnvdimm: async notification support
In preparation for asynchronous address range scrub support add an
ability for the pmem driver to dynamically consume address range scrub
results.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nd.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/nd.h b/include/linux/nd.h index 507e47c86737..5489ab756d1a 100644 --- a/include/linux/nd.h +++ b/include/linux/nd.h @@ -16,11 +16,16 @@ #include <linux/ndctl.h> #include <linux/device.h> +enum nvdimm_event { + NVDIMM_REVALIDATE_POISON, +}; + struct nd_device_driver { struct device_driver drv; unsigned long type; int (*probe)(struct device *dev); int (*remove)(struct device *dev); + void (*notify)(struct device *dev, enum nvdimm_event event); }; static inline struct nd_device_driver *to_nd_device_driver( @@ -144,6 +149,8 @@ static inline int nvdimm_write_bytes(struct nd_namespace_common *ndns, MODULE_ALIAS("nd:t" __stringify(type) "*") #define ND_DEVICE_MODALIAS_FMT "nd:t%d" +struct nd_region; +void nvdimm_region_notify(struct nd_region *nd_region, enum nvdimm_event event); int __must_check __nd_driver_register(struct nd_device_driver *nd_drv, struct module *module, const char *mod_name); #define nd_driver_register(driver) \ |