History

dm,dax: Add dax zero_page_range operation

This patch adds support for dax zero_page_range operation to dm targets.

Vivek Goyal committed 6 years ago

Commit cdf6cdc1 parent 79fa9745 files · +91 −0Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/device-mapper.h+3−0
@@ -141,6 +141,8 @@ typedef long (*dm_dax_direct_access_fn) (struct dm_target *ti, pgoff_t pgoff, · 140 unmodified lines
141 long nr_pages, void **kaddr, pfn_t *pfn);141 long nr_pages, void **kaddr, pfn_t *pfn);
142typedef size_t (*dm_dax_copy_iter_fn)(struct dm_target *ti, pgoff_t pgoff,142typedef size_t (*dm_dax_copy_iter_fn)(struct dm_target *ti, pgoff_t pgoff,
143 void *addr, size_t bytes, struct iov_iter *i);143 void *addr, size_t bytes, struct iov_iter *i);
144typedef int (*dm_dax_zero_page_range_fn)(struct dm_target *ti, pgoff_t pgoff,
145 size_t nr_pages);
144#define PAGE_SECTORS (PAGE_SIZE / 512)146#define PAGE_SECTORS (PAGE_SIZE / 512)
145 147
146void dm_error(const char *message);148void dm_error(const char *message);
@@ -195,6 +197,7 @@ struct target_type { · 48 unmodified lines
195 dm_dax_direct_access_fn direct_access;197 dm_dax_direct_access_fn direct_access;
196 dm_dax_copy_iter_fn dax_copy_from_iter;198 dm_dax_copy_iter_fn dax_copy_from_iter;
197 dm_dax_copy_iter_fn dax_copy_to_iter;199 dm_dax_copy_iter_fn dax_copy_to_iter;
200 dm_dax_zero_page_range_fn dax_zero_page_range;
198 201
199 /* For internal device-mapper use. */202 /* For internal device-mapper use. */
200 struct list_head list;203 struct list_head list;