mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
5faecf4eb0
commit
719994660c
5 changed files with 62 additions and 0 deletions
|
@ -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) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue