summaryrefslogtreecommitdiff
path: root/fs/btrfs/tree-defrag.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-10-16 00:17:34 +0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 19:03:56 +0400
commit6b80053d02be41886344b5007d04e345311ec0b5 (patch)
treec935b3f2f4a582697167c52f57b0985137a95206 /fs/btrfs/tree-defrag.c
parent09e71a326341f40111400c88aaf0498ef622824b (diff)
downloadlinux-6b80053d02be41886344b5007d04e345311ec0b5.tar.xz
Btrfs: Add back the online defragging code
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/tree-defrag.c')
-rw-r--r--fs/btrfs/tree-defrag.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/btrfs/tree-defrag.c b/fs/btrfs/tree-defrag.c
index 3feac2f28628..d23216aa4ab5 100644
--- a/fs/btrfs/tree-defrag.c
+++ b/fs/btrfs/tree-defrag.c
@@ -116,10 +116,10 @@ static int defrag_walk_down(struct btrfs_trans_handle *trans,
}
WARN_ON(*level < 0);
WARN_ON(*level >= BTRFS_MAX_LEVEL);
-#if 0
- clear_buffer_defrag(path->nodes[*level]);
- clear_buffer_defrag_done(path->nodes[*level]);
-#endif
+
+ btrfs_clear_buffer_defrag(path->nodes[*level]);
+ btrfs_clear_buffer_defrag_done(path->nodes[*level]);
+
free_extent_buffer(path->nodes[*level]);
path->nodes[*level] = NULL;
*level += 1;
@@ -148,10 +148,8 @@ static int defrag_walk_up(struct btrfs_trans_handle *trans,
root->defrag_level = i;
return 0;
} else {
- /*
- clear_buffer_defrag(path->nodes[*level]);
- clear_buffer_defrag_done(path->nodes[*level]);
- */
+ btrfs_clear_buffer_defrag(path->nodes[*level]);
+ btrfs_clear_buffer_defrag_done(path->nodes[*level]);
free_extent_buffer(path->nodes[*level]);
path->nodes[*level] = NULL;
*level = i + 1;