aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/alloc.c
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/alloc.c
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/alloc.c')
-rw-r--r--fs/ocfs2/alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index b8fc95d10630..7c879fc7834f 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -6974,7 +6974,7 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb,
6974 ocfs2_blocks_to_clusters(osb->sb, 6974 ocfs2_blocks_to_clusters(osb->sb,
6975 delete_blk), 6975 delete_blk),
6976 clusters_to_del, meta_ac, 6976 clusters_to_del, meta_ac,
6977 &tc->tc_dealloc); 6977 &tc->tc_dealloc, 1);
6978 else 6978 else
6979 status = ocfs2_truncate_log_append(osb, handle, 6979 status = ocfs2_truncate_log_append(osb, handle,
6980 delete_blk, 6980 delete_blk,