diff options
author | Christoph Hellwig <hch@lst.de> | 2016-05-09 04:47:04 -0400 |
---|---|---|
committer | Vishal Verma <vishal.l.verma@intel.com> | 2016-05-18 14:16:56 -0400 |
commit | 679c8bd3b29428e736eabb7fc66a978f312f0c86 (patch) | |
tree | cf8a07f8da720780335f995d6a8d2faf202d7875 /include/linux/dax.h | |
parent | 3dc29161070ab14d065554c0ad58988ab77a7bfd (diff) |
dax: export a low-level __dax_zero_page_range helper
This allows XFS to perform zeroing using the iomap infrastructure and
avoid buffer heads.
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christoph Hellwig <hch@lst.de>
[vishal: fix conflicts with dax-error-handling]
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Diffstat (limited to 'include/linux/dax.h')
-rw-r--r-- | include/linux/dax.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/dax.h b/include/linux/dax.h index 7f853ffaa987..90fbc99e5313 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h | |||
@@ -14,12 +14,19 @@ int __dax_fault(struct vm_area_struct *, struct vm_fault *, get_block_t); | |||
14 | 14 | ||
15 | #ifdef CONFIG_FS_DAX | 15 | #ifdef CONFIG_FS_DAX |
16 | struct page *read_dax_sector(struct block_device *bdev, sector_t n); | 16 | struct page *read_dax_sector(struct block_device *bdev, sector_t n); |
17 | int __dax_zero_page_range(struct block_device *bdev, sector_t sector, | ||
18 | unsigned int offset, unsigned int length); | ||
17 | #else | 19 | #else |
18 | static inline struct page *read_dax_sector(struct block_device *bdev, | 20 | static inline struct page *read_dax_sector(struct block_device *bdev, |
19 | sector_t n) | 21 | sector_t n) |
20 | { | 22 | { |
21 | return ERR_PTR(-ENXIO); | 23 | return ERR_PTR(-ENXIO); |
22 | } | 24 | } |
25 | static inline int __dax_zero_page_range(struct block_device *bdev, | ||
26 | sector_t sector, unsigned int offset, unsigned int length) | ||
27 | { | ||
28 | return -ENXIO; | ||
29 | } | ||
23 | #endif | 30 | #endif |
24 | 31 | ||
25 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 32 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |