summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-defrag.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-08-09 02:17:12 +0200
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-08-09 02:17:12 +0200
commit409eb95d7f6632d5af32b795244ce68a29e49319 (patch)
treed652da6d5c5055a5f090e3327e512d752d430279 /fs/btrfs/tree-defrag.c
parentBtrfs: Replace extent tree preallocation code with some bit radix magic. (diff)
downloadlinux-409eb95d7f6632d5af32b795244ce68a29e49319.tar.xz
linux-409eb95d7f6632d5af32b795244ce68a29e49319.zip
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.c7
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,
int level;
int orig_level;
int i;
- int num_runs = 0;
if (root->ref_cows == 0) {
goto out;
@@ -200,10 +199,8 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
break;
if (wret < 0)
ret = wret;
- if (num_runs++ > 8) {
- ret = -EAGAIN;
- break;
- }
+ ret = -EAGAIN;
+ break;
}
for (i = 0; i <= orig_level; i++) {
if (path->nodes[i]) {