ocfs2: CoW refcount tree improvement.
authorTao Ma <tao.ma@oracle.com>
Tue, 18 Aug 2009 03:30:55 +0000 (11:30 +0800)
committerJoel Becker <joel.becker@oracle.com>
Wed, 23 Sep 2009 03:09:36 +0000 (20:09 -0700)
commit6ae23c5555176c5b23480c9c578ff27437085ba5
tree4afb1c33e850fa751c6136d65a041f70fe146fe8
parent6f70fa519976a379d72781d927cf8e5f5b05ec86
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>
fs/ocfs2/alloc.c
fs/ocfs2/refcounttree.c
fs/ocfs2/refcounttree.h