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 <hch@lst.de> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Link: https://lore.kernel.org/r/20211129102203.2243509-23-hch@lst.de Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 5b5abbe commit a50f6ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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)