summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_reflink.h
diff options
context:
space:
mode:
authorDarrick J. Wong2017-06-16 20:00:11 +0200
committerDarrick J. Wong2017-06-19 23:11:35 +0200
commitea7cdd7b7baffc40d1e60de7c93e5b1aabb3d081 (patch)
treee531f5a38374af23f937742227c1e6a8680ef4b9 /fs/xfs/xfs_reflink.h
parentxfs: reflink find shared should take a transaction (diff)
downloadkernel-qcow2-linux-ea7cdd7b7baffc40d1e60de7c93e5b1aabb3d081.tar.gz
kernel-qcow2-linux-ea7cdd7b7baffc40d1e60de7c93e5b1aabb3d081.tar.xz
kernel-qcow2-linux-ea7cdd7b7baffc40d1e60de7c93e5b1aabb3d081.zip
xfs: separate function to check if inode shares extents
Separate the "clear reflink flag" function into one function that checks if the flag is needed, and a second function that checks and clears the flag. The inode scrub code will want to check the necessity of the flag without clearing it. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_reflink.h')
-rw-r--r--fs/xfs/xfs_reflink.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_reflink.h b/fs/xfs/xfs_reflink.h
index b8cc5c3e2724..701487bab468 100644
--- a/fs/xfs/xfs_reflink.h
+++ b/fs/xfs/xfs_reflink.h
@@ -47,6 +47,8 @@ extern int xfs_reflink_end_cow(struct xfs_inode *ip, xfs_off_t offset,
extern int xfs_reflink_recover_cow(struct xfs_mount *mp);
extern int xfs_reflink_remap_range(struct file *file_in, loff_t pos_in,
struct file *file_out, loff_t pos_out, u64 len, bool is_dedupe);
+extern int xfs_reflink_inode_has_shared_extents(struct xfs_trans *tp,
+ struct xfs_inode *ip, bool *has_shared);
extern int xfs_reflink_clear_inode_flag(struct xfs_inode *ip,
struct xfs_trans **tpp);
extern int xfs_reflink_unshare(struct xfs_inode *ip, xfs_off_t offset,