]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: simplify xfs_reflink_convert_cow
authorChristoph Hellwig <hch@lst.de>
Fri, 17 Nov 2017 04:11:35 +0000 (22:11 -0600)
committerEric Sandeen <sandeen@redhat.com>
Fri, 17 Nov 2017 04:11:35 +0000 (22:11 -0600)
commit8e87c8847a2933650fb288b5f32d1141e7694860
tree38c0f66e6428abd7259e0539b85ad13a846f33c1
parent9788e059ce7c64ae5d7618e6e088625af2e335e2
xfs: simplify xfs_reflink_convert_cow

Source kernel commit: b121459c7a56d2fb5a8ca6727bf9f87982738b01

Instead of looking up extents to convert and calling xfs_bmapi_write on
each of them just let xfs_bmapi_write handle the full range.  To make
this robust add a new XFS_BMAPI_CONVERT_ONLY that only converts ranges
and never allocates blocks.

[darrick: shorten the stringified CONVERT_ONLY trace flag]

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c
libxfs/xfs_bmap.h