diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-08-08 20:17:12 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-08-08 20:17:12 -0400 |
commit | 409eb95d7f6632d5af32b795244ce68a29e49319 (patch) | |
tree | d652da6d5c5055a5f090e3327e512d752d430279 /fs/btrfs/tree-defrag.c | |
parent | 26b8003f10569a9155b7539ef5a7379ee0c6b050 (diff) |
Btrfs: Further reduce the concurrency penalty of defrag and drop_snapshot
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 | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/btrfs/tree-defrag.c b/fs/btrfs/tree-defrag.c index 15d0a486fb59..7ea66b4aa5c2 100644 --- a/fs/btrfs/tree-defrag.c +++ b/fs/btrfs/tree-defrag.c | |||
@@ -148,7 +148,6 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, | |||
148 | int level; | 148 | int level; |
149 | int orig_level; | 149 | int orig_level; |
150 | int i; | 150 | int i; |
151 | int num_runs = 0; | ||
152 | 151 | ||
153 | if (root->ref_cows == 0) { | 152 | if (root->ref_cows == 0) { |
154 | goto out; | 153 | goto out; |
@@ -200,10 +199,8 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, | |||
200 | break; | 199 | break; |
201 | if (wret < 0) | 200 | if (wret < 0) |
202 | ret = wret; | 201 | ret = wret; |
203 | if (num_runs++ > 8) { | 202 | ret = -EAGAIN; |
204 | ret = -EAGAIN; | 203 | break; |
205 | break; | ||
206 | } | ||
207 | } | 204 | } |
208 | for (i = 0; i <= orig_level; i++) { | 205 | for (i = 0; i <= orig_level; i++) { |
209 | if (path->nodes[i]) { | 206 | if (path->nodes[i]) { |