aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/refcounttree.h
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2009-08-17 23:30:55 -0400
committerJoel Becker <joel.becker@oracle.com>2009-09-22 23:09:36 -0400
commit6ae23c5555176c5b23480c9c578ff27437085ba5 (patch)
tree4afb1c33e850fa751c6136d65a041f70fe146fe8 /fs/ocfs2/refcounttree.h
parent6f70fa519976a379d72781d927cf8e5f5b05ec86 (diff)
ocfs2: CoW refcount tree improvement.
During CoW, if the old extent record is refcounted, we allocate som new clusters and do CoW. Actually we can have some improvement here. If the old extent has refcount=1, that means now it is only used by this file. So we don't need to allocate new clusters, just remove the refcounted flag and it is OK. We also have to remove it from the refcount tree while not deleting it. Signed-off-by: Tao Ma <tao.ma@oracle.com>
Diffstat (limited to 'fs/ocfs2/refcounttree.h')
-rw-r--r--fs/ocfs2/refcounttree.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ocfs2/refcounttree.h b/fs/ocfs2/refcounttree.h
index 9960878134df..a8c15b0b2307 100644
--- a/fs/ocfs2/refcounttree.h
+++ b/fs/ocfs2/refcounttree.h
@@ -44,7 +44,8 @@ void ocfs2_unlock_refcount_tree(struct ocfs2_super *osb,
44int ocfs2_decrease_refcount(struct inode *inode, 44int ocfs2_decrease_refcount(struct inode *inode,
45 handle_t *handle, u32 cpos, u32 len, 45 handle_t *handle, u32 cpos, u32 len,
46 struct ocfs2_alloc_context *meta_ac, 46 struct ocfs2_alloc_context *meta_ac,
47 struct ocfs2_cached_dealloc_ctxt *dealloc); 47 struct ocfs2_cached_dealloc_ctxt *dealloc,
48 int delete);
48int ocfs2_prepare_refcount_change_for_del(struct inode *inode, 49int ocfs2_prepare_refcount_change_for_del(struct inode *inode,
49 struct buffer_head *di_bh, 50 struct buffer_head *di_bh,
50 u64 phys_blkno, 51 u64 phys_blkno,