Skip to content

Commit a50f6ab

Browse files
Christoph Hellwigdjbw
authored andcommitted
xfs: use xfs_direct_write_iomap_ops for DAX zeroing
While the buffered write iomap ops do work due to the fact that zeroing never allocates blocks, the DAX zeroing should use the direct ops just like actual DAX I/O. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Dan Williams <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]>
1 parent 5b5abbe commit a50f6ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/xfs/xfs_iomap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ xfs_zero_range(
13221322

13231323
if (IS_DAX(inode))
13241324
return dax_zero_range(inode, pos, len, did_zero,
1325-
&xfs_buffered_write_iomap_ops);
1325+
&xfs_direct_write_iomap_ops);
13261326
return iomap_zero_range(inode, pos, len, did_zero,
13271327
&xfs_buffered_write_iomap_ops);
13281328
}
@@ -1337,7 +1337,7 @@ xfs_truncate_page(
13371337

13381338
if (IS_DAX(inode))
13391339
return dax_truncate_page(inode, pos, did_zero,
1340-
&xfs_buffered_write_iomap_ops);
1340+
&xfs_direct_write_iomap_ops);
13411341
return iomap_truncate_page(inode, pos, did_zero,
13421342
&xfs_buffered_write_iomap_ops);
13431343
}

0 commit comments

Comments
 (0)