]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: simplify xfs_reflink_convert_cow
authorChristoph Hellwig <hch@lst.de>
Fri, 3 Nov 2017 17:34:44 +0000 (10:34 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 6 Nov 2017 19:53:40 +0000 (11:53 -0800)
commitc489f42b03af6b3feccf8a64d2f831046ea3fe3e
tree533094a7a0f1f16f6b41dbfe915eb4849ff714ad
parentc450a8b29d0c971ae2d2ee42fd4a0ed50fff8b53
xfs: simplify xfs_reflink_convert_cow

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>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_bmap.h
fs/xfs/xfs_reflink.c