From ea7cdd7b7baffc40d1e60de7c93e5b1aabb3d081 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Fri, 16 Jun 2017 11:00:11 -0700 Subject: 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 Reviewed-by: Brian Foster --- fs/xfs/xfs_reflink.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/xfs/xfs_reflink.h') 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, -- cgit v1.2.3