History

fsdax: decouple zeroing from the iomap buffered I/O code

Unshare the DAX and iomap buffered I/O page zeroing code. This code previously did a IS_DAX check deep inside the iomap code, which in fact was the only DAX check in the code. Instead move these checks into the callers. Most callers already have DAX special casing anyway and XFS will need it for reflink support as well.

Christoph Hellwig committed 4 years ago

Commit c6f40461 parent e5c71956 files · +94 −44Browse files

Showing the changes to include (1 of 6 files). Show all

Unified · Split

include/linux/dax.h+6−1
@@ -14,6 +14,7 @@ typedef unsigned long dax_entry_t; · 13 unmodified lines
1414 struct dax_device;
1515 struct gendisk;
1616 struct iomap_ops;
17+struct iomap_iter;
1718 struct iomap;
1819
1920 struct dax_operations {
@@ -170,6 +171,11 @@ static inline void dax_unlock_page(struct page *page, dax_entry_t cookie) · 150 unmodified lines
170171 }
171172 #endif
172173
174+int dax_zero_range(struct inode *inode, loff_t pos, loff_t len, bool *did_zero,
175+ const struct iomap_ops *ops);
176+int dax_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
177+ const struct iomap_ops *ops);
178+
173179 #if IS_ENABLED(CONFIG_DAX)
174180 int dax_read_lock(void);
175181 void dax_read_unlock(int id);
@@ -204,7 +210,6 @@ vm_fault_t dax_finish_sync_fault(struct vm_fault *vmf, · 28 unmodified lines
204210 int dax_delete_mapping_entry(struct address_space *mapping, pgoff_t index);
205211 int dax_invalidate_mapping_entry_sync(struct address_space *mapping,
206212 pgoff_t index);
207−s64 dax_iomap_zero(loff_t pos, u64 length, struct iomap *iomap);
208213 static inline bool dax_mapping(struct address_space *mapping)
209214 {
210215 return mapping->host && IS_DAX(mapping->host);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t