summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_file.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-02-06 19:51:03 +0100
committerDarrick J. Wong <darrick.wong@oracle.com>2017-02-07 02:47:47 +0100
commit3c68d44a2b49a0ac9165faa9c191e1e618c8a8d5 (patch)
tree5b9681a04b0fddce02510303a33546794f2b0568 /fs/xfs/xfs_file.c
parentxfs: go straight to real allocations for direct I/O COW writes (diff)
downloadlinux-3c68d44a2b49a0ac9165faa9c191e1e618c8a8d5.tar.xz
linux-3c68d44a2b49a0ac9165faa9c191e1e618c8a8d5.zip
xfs: allocate direct I/O COW blocks in iomap_begin
Instead of preallocating all the required COW blocks in the high-level write code do it inside the iomap code, like we do for all other I/O. 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>
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r--fs/xfs/xfs_file.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 2a695a8f4fe7..086440e79b86 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -561,14 +561,6 @@ xfs_file_dio_aio_write(
}
trace_xfs_file_direct_write(ip, count, iocb->ki_pos);
-
- /* If this is a block-aligned directio CoW, remap immediately. */
- if (xfs_is_reflink_inode(ip) && !unaligned_io) {
- ret = xfs_reflink_allocate_cow_range(ip, iocb->ki_pos, count);
- if (ret)
- goto out;
- }
-
ret = iomap_dio_rw(iocb, from, &xfs_iomap_ops, xfs_dio_write_end_io);
out:
xfs_iunlock(ip, iolock);