diff options
author | Christoph Hellwig <hch@lst.de> | 2017-02-06 21:51:03 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-02-07 04:47:47 +0300 |
commit | 3c68d44a2b49a0ac9165faa9c191e1e618c8a8d5 (patch) | |
tree | 5b9681a04b0fddce02510303a33546794f2b0568 /fs/xfs/xfs_file.c | |
parent | a14234c72bf41ac96bc8c98e96e2c84b6d4bd4f2 (diff) | |
download | linux-3c68d44a2b49a0ac9165faa9c191e1e618c8a8d5.tar.xz |
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.c | 8 |
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); |