Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131066
b: refs/heads/master
c: 7b78c17
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Feb 4, 2009
1 parent 7e96a1d commit ee0a1ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 12f4daccfc3732280debba8f9ba49720372de831
refs/heads/master: 7b78c170dc4f538cc7ee66f47b3aac3f3974a36c
9 changes: 6 additions & 3 deletions trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1518,18 +1518,19 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
*/
if (prealloc_block.objectid &&
prealloc_block.offset != b->len) {
btrfs_set_path_blocking(p);
btrfs_release_path(root, p);
btrfs_free_reserved_extent(root,
prealloc_block.objectid,
prealloc_block.offset);
prealloc_block.objectid = 0;
goto again;
}

/*
* for higher level blocks, try not to allocate blocks
* with the block and the parent locks held.
*/
if (level > 1 && !prealloc_block.objectid &&
if (level > 0 && !prealloc_block.objectid &&
btrfs_path_lock_waiting(p, level)) {
u32 size = b->len;
u64 hint = b->start;
Expand Down Expand Up @@ -1614,7 +1615,9 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
}
b = p->nodes[level];
slot = p->slots[level];
} else if (ins_len < 0) {
} else if (ins_len < 0 &&
btrfs_header_nritems(b) <
BTRFS_NODEPTRS_PER_BLOCK(root) / 4) {
int sret;

sret = reada_for_balance(root, p, level);
Expand Down

0 comments on commit ee0a1ba

Please sign in to comment.