diff options
author | Tao Ma <tao.ma@oracle.com> | 2009-08-18 11:30:55 +0800 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-09-22 20:09:36 -0700 |
commit | 6ae23c5555176c5b23480c9c578ff27437085ba5 (patch) | |
tree | 4afb1c33e850fa751c6136d65a041f70fe146fe8 /fs/ocfs2/refcounttree.h | |
parent | 6f70fa519976a379d72781d927cf8e5f5b05ec86 (diff) | |
download | linux-stable-6ae23c5555176c5b23480c9c578ff27437085ba5.tar.gz linux-stable-6ae23c5555176c5b23480c9c578ff27437085ba5.tar.bz2 linux-stable-6ae23c5555176c5b23480c9c578ff27437085ba5.zip |
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.h | 3 |
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, int ocfs2_decrease_refcount(struct inode *inode, handle_t *handle, u32 cpos, u32 len, struct ocfs2_alloc_context *meta_ac, - struct ocfs2_cached_dealloc_ctxt *dealloc); + struct ocfs2_cached_dealloc_ctxt *dealloc, + int delete); int ocfs2_prepare_refcount_change_for_del(struct inode *inode, struct buffer_head *di_bh, u64 phys_blkno, |