diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-10-15 16:17:34 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:56 -0400 |
commit | 6b80053d02be41886344b5007d04e345311ec0b5 (patch) | |
tree | c935b3f2f4a582697167c52f57b0985137a95206 /fs/btrfs/tree-defrag.c | |
parent | 09e71a326341f40111400c88aaf0498ef622824b (diff) |
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.c | 14 |
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, | |||
116 | } | 116 | } |
117 | WARN_ON(*level < 0); | 117 | WARN_ON(*level < 0); |
118 | WARN_ON(*level >= BTRFS_MAX_LEVEL); | 118 | WARN_ON(*level >= BTRFS_MAX_LEVEL); |
119 | #if 0 | 119 | |
120 | clear_buffer_defrag(path->nodes[*level]); | 120 | btrfs_clear_buffer_defrag(path->nodes[*level]); |
121 | clear_buffer_defrag_done(path->nodes[*level]); | 121 | btrfs_clear_buffer_defrag_done(path->nodes[*level]); |
122 | #endif | 122 | |
123 | free_extent_buffer(path->nodes[*level]); | 123 | free_extent_buffer(path->nodes[*level]); |
124 | path->nodes[*level] = NULL; | 124 | path->nodes[*level] = NULL; |
125 | *level += 1; | 125 | *level += 1; |
@@ -148,10 +148,8 @@ static int defrag_walk_up(struct btrfs_trans_handle *trans, | |||
148 | root->defrag_level = i; | 148 | root->defrag_level = i; |
149 | return 0; | 149 | return 0; |
150 | } else { | 150 | } else { |
151 | /* | 151 | btrfs_clear_buffer_defrag(path->nodes[*level]); |
152 | clear_buffer_defrag(path->nodes[*level]); | 152 | btrfs_clear_buffer_defrag_done(path->nodes[*level]); |
153 | clear_buffer_defrag_done(path->nodes[*level]); | ||
154 | */ | ||
155 | free_extent_buffer(path->nodes[*level]); | 153 | free_extent_buffer(path->nodes[*level]); |
156 | path->nodes[*level] = NULL; | 154 | path->nodes[*level] = NULL; |
157 | *level = i + 1; | 155 | *level = i + 1; |