Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128431
b: refs/heads/master
c: 409eb95
h: refs/heads/master
i:
  128429: 7a34a7e
  128427: d52b42d
  128423: f6214a8
  128415: 4763d7b
v: v3
  • Loading branch information
Chris Mason authored and David Woodhouse committed Aug 9, 2007
1 parent 42a8d87 commit 2742724
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26b8003f10569a9155b7539ef5a7379ee0c6b050
refs/heads/master: 409eb95d7f6632d5af32b795244ce68a29e49319
13 changes: 6 additions & 7 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,10 @@ static void reada_walk_down(struct btrfs_root *root,
BUG_ON(ret);
if (refs != 1)
continue;
mutex_unlock(&root->fs_info->fs_mutex);
ret = readahead_tree_block(root, blocknr);
cond_resched();
mutex_lock(&root->fs_info->fs_mutex);
if (ret)
break;
}
Expand Down Expand Up @@ -1445,7 +1448,6 @@ int btrfs_drop_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root
struct btrfs_path *path;
int i;
int orig_level;
int num_walks = 0;
struct btrfs_root_item *root_item = &root->root_item;

path = btrfs_alloc_path();
Expand Down Expand Up @@ -1486,12 +1488,9 @@ int btrfs_drop_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root
break;
if (wret < 0)
ret = wret;
num_walks++;
if (num_walks > 2) {
ret = -EAGAIN;
get_bh(root->node);
break;
}
ret = -EAGAIN;
get_bh(root->node);
break;
}
for (i = 0; i <= orig_level; i++) {
if (path->nodes[i]) {
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ int btrfs_defrag_dirty_roots(struct btrfs_fs_info *info)
break;
}
root->defrag_running = 0;
radix_tree_tag_clear(&info->fs_roots_radix,
(unsigned long)root->root_key.objectid,
BTRFS_ROOT_DEFRAG_TAG);
}
}
btrfs_end_transaction(trans, tree_root);
Expand Down
7 changes: 2 additions & 5 deletions trunk/fs/btrfs/tree-defrag.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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]) {
Expand Down

0 comments on commit 2742724

Please sign in to comment.