diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-01-24 21:44:18 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-04-19 18:14:35 -0400 |
commit | 6568b08b77816cda2a95919c7494108d983d5941 (patch) | |
tree | cdc776afdf8dd6c583155d169017eb78ab94a8bf /drivers/dax/dax.h | |
parent | 72058005411ffddcae6c06f7b691d635489132af (diff) |
dax: introduce dax_operations
Track a set of dax_operations per dax_device that can be set at
alloc_dax() time. These operations will be used to stop the abuse of
block_device_operations for communicating dax capabilities to
filesystems. It will also be used to replace the "pmem api" and move
pmem-specific cache maintenance, and other dax-driver-specific
filesystem-dax operations, to dax device methods. In particular this
allows us to stop abusing __copy_user_nocache(), via memcpy_to_pmem(),
with a driver specific replacement.
This is a standalone introduction of the operations. Follow on patches
convert each dax-driver and teach fs/dax.c to use ->direct_access() from
dax_operations instead of block_device_operations.
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dax/dax.h')
-rw-r--r-- | drivers/dax/dax.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dax/dax.h b/drivers/dax/dax.h index 246a24d68d4c..617bbc24be2b 100644 --- a/drivers/dax/dax.h +++ b/drivers/dax/dax.h | |||
@@ -13,7 +13,9 @@ | |||
13 | #ifndef __DAX_H__ | 13 | #ifndef __DAX_H__ |
14 | #define __DAX_H__ | 14 | #define __DAX_H__ |
15 | struct dax_device; | 15 | struct dax_device; |
16 | struct dax_device *alloc_dax(void *private, const char *host); | 16 | struct dax_operations; |
17 | struct dax_device *alloc_dax(void *private, const char *host, | ||
18 | const struct dax_operations *ops); | ||
17 | void put_dax(struct dax_device *dax_dev); | 19 | void put_dax(struct dax_device *dax_dev); |
18 | bool dax_alive(struct dax_device *dax_dev); | 20 | bool dax_alive(struct dax_device *dax_dev); |
19 | void kill_dax(struct dax_device *dax_dev); | 21 | void kill_dax(struct dax_device *dax_dev); |