Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2999d12f authored by Tao Ma's avatar Tao Ma Committed by Joel Becker
Browse files

ocfs2: Add reflink support for xattr.



Signed-off-by: default avatarTao Ma <tao.ma@oracle.com>
parent a7fe7a3a
Loading
Loading
Loading
Loading
+12 −12
Original line number Original line Diff line number Diff line
@@ -1894,7 +1894,7 @@ static int ocfs2_split_refcount_rec(handle_t *handle,
	return ret;
	return ret;
}
}


static int __ocfs2_increase_refcount(handle_t *handle,
int ocfs2_increase_refcount(handle_t *handle,
			    struct ocfs2_caching_info *ci,
			    struct ocfs2_caching_info *ci,
			    struct buffer_head *ref_root_bh,
			    struct buffer_head *ref_root_bh,
			    u64 cpos, u32 len,
			    u64 cpos, u32 len,
@@ -3631,7 +3631,7 @@ int ocfs2_add_refcount_flag(struct inode *inode,
		goto out_commit;
		goto out_commit;
	}
	}


	ret = __ocfs2_increase_refcount(handle, ref_ci, ref_root_bh,
	ret = ocfs2_increase_refcount(handle, ref_ci, ref_root_bh,
				      p_cluster, num_clusters,
				      p_cluster, num_clusters,
				      meta_ac, dealloc);
				      meta_ac, dealloc);
	if (ret) {
	if (ret) {
@@ -3822,7 +3822,7 @@ static int ocfs2_add_refcounted_extent(struct inode *inode,
		goto out_commit;
		goto out_commit;
	}
	}


	ret = __ocfs2_increase_refcount(handle, ref_ci, ref_root_bh,
	ret = ocfs2_increase_refcount(handle, ref_ci, ref_root_bh,
				      p_cluster, num_clusters,
				      p_cluster, num_clusters,
				      meta_ac, dealloc);
				      meta_ac, dealloc);
	if (ret)
	if (ret)
+6 −0
Original line number Original line Diff line number Diff line
@@ -93,4 +93,10 @@ int ocfs2_add_refcount_flag(struct inode *inode,
int ocfs2_remove_refcount_tree(struct inode *inode, struct buffer_head *di_bh);
int ocfs2_remove_refcount_tree(struct inode *inode, struct buffer_head *di_bh);
int ocfs2_try_remove_refcount_tree(struct inode *inode,
int ocfs2_try_remove_refcount_tree(struct inode *inode,
				   struct buffer_head *di_bh);
				   struct buffer_head *di_bh);
int ocfs2_increase_refcount(handle_t *handle,
			    struct ocfs2_caching_info *ci,
			    struct buffer_head *ref_root_bh,
			    u64 cpos, u32 len,
			    struct ocfs2_alloc_context *meta_ac,
			    struct ocfs2_cached_dealloc_ctxt *dealloc);
#endif /* OCFS2_REFCOUNTTREE_H */
#endif /* OCFS2_REFCOUNTTREE_H */
+923 −0

File changed.

Preview size limit exceeded, changes collapsed.

+4 −0
Original line number Original line Diff line number Diff line
@@ -90,4 +90,8 @@ int ocfs2_xattr_attach_refcount_tree(struct inode *inode,
				     struct ocfs2_caching_info *ref_ci,
				     struct ocfs2_caching_info *ref_ci,
				     struct buffer_head *ref_root_bh,
				     struct buffer_head *ref_root_bh,
				     struct ocfs2_cached_dealloc_ctxt *dealloc);
				     struct ocfs2_cached_dealloc_ctxt *dealloc);
int ocfs2_reflink_xattrs(struct inode *old_inode,
			 struct buffer_head *old_bh,
			 struct inode *new_inode,
			 struct buffer_head *new_bh);
#endif /* OCFS2_XATTR_H */
#endif /* OCFS2_XATTR_H */