xfs: merge COW handling into xfs_file_iomap_begin_delay
authorChristoph Hellwig <hch@lst.de>
Mon, 18 Feb 2019 17:38:47 +0000 (09:38 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 21 Feb 2019 15:55:07 +0000 (07:55 -0800)
commitdb46e604adf8c923214a63b46e87ca2411d3d580
treeec4797241a36cc5dc9d2b0d8fb466d8bc98f1bc1
parent12df89f28fa92e54bfb2ae01f9ee059e74e1acc0
xfs: merge COW handling into xfs_file_iomap_begin_delay

Besides simplifying the code a bit this allows to actually implement
the behavior of using COW preallocation for non-COW data mentioned
in the current comments.

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>
fs/xfs/xfs_iomap.c
fs/xfs/xfs_reflink.c
fs/xfs/xfs_reflink.h
fs/xfs/xfs_trace.h