xfs: split the iomap ops for buffered vs direct writes
Instead of lots of magic conditionals in the main write_begin handler this make the intent very clear. Thing will become even better once we support delayed allocations for extent size hints and realtime allocations. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Darrick J. Wong

parent
a526c85c22
commit
f150b42343
@@ -1113,7 +1113,8 @@ xfs_free_file_space(
|
||||
return 0;
|
||||
if (offset + len > XFS_ISIZE(ip))
|
||||
len = XFS_ISIZE(ip) - offset;
|
||||
error = iomap_zero_range(VFS_I(ip), offset, len, NULL, &xfs_iomap_ops);
|
||||
error = iomap_zero_range(VFS_I(ip), offset, len, NULL,
|
||||
&xfs_buffered_write_iomap_ops);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
Reference in New Issue
Block a user