This patch adds support for dax zero_page_range operation to dm targets.
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -141,6 +141,8 @@ typedef long (*dm_dax_direct_access_fn) (struct dm_target *ti, pgoff_t pgoff, · 140 unmodified lines | ||
| 141 | 141 | long nr_pages, void **kaddr, pfn_t *pfn); |
| 142 | 142 | typedef size_t (*dm_dax_copy_iter_fn)(struct dm_target *ti, pgoff_t pgoff, |
| 143 | 143 | void *addr, size_t bytes, struct iov_iter *i); |
| 144 | +typedef int (*dm_dax_zero_page_range_fn)(struct dm_target *ti, pgoff_t pgoff, | |
| 145 | + size_t nr_pages); | |
| 144 | 146 | #define PAGE_SECTORS (PAGE_SIZE / 512) |
| 145 | 147 | |
| 146 | 148 | void dm_error(const char *message); |
| @@ -195,6 +197,7 @@ struct target_type { · 48 unmodified lines | ||
| 195 | 197 | dm_dax_direct_access_fn direct_access; |
| 196 | 198 | dm_dax_copy_iter_fn dax_copy_from_iter; |
| 197 | 199 | dm_dax_copy_iter_fn dax_copy_to_iter; |
| 200 | + dm_dax_zero_page_range_fn dax_zero_page_range; | |
| 198 | 201 | |
| 199 | 202 | /* For internal device-mapper use. */ |
| 200 | 203 | struct list_head list; |