summaryrefslogtreecommitdiff
path: root/ctree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-04-24 10:18:25 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-04-24 10:18:25 -0400
commitd8ecd9205a5af776cb77e0c153eaf4dd4cb703dd (patch)
tree0d471f8804843a7a3278c94d113ad15ddaf105c6 /ctree.c
parent3ce95795030eca164c1a78dae013c78a65602b43 (diff)
Keep more pointers free in the nodes for double splits
Diffstat (limited to 'ctree.c')
-rw-r--r--ctree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctree.c b/ctree.c
index eea7936a..184d8422 100644
--- a/ctree.c
+++ b/ctree.c
@@ -1107,7 +1107,7 @@ again:
slot -= 1;
p->slots[level] = slot;
if (ins_len > 0 && btrfs_header_nritems(b) >=
- BTRFS_NODEPTRS_PER_BLOCK(root) - 1) {
+ BTRFS_NODEPTRS_PER_BLOCK(root) - 3) {
int sret = split_node(trans, root, p, level);
BUG_ON(sret > 0);
if (sret)
@@ -1446,7 +1446,7 @@ static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root
ret = push_nodes_for_insert(trans, root, path, level);
c = path->nodes[level];
if (!ret && btrfs_header_nritems(c) <
- BTRFS_NODEPTRS_PER_BLOCK(root) - 1)
+ BTRFS_NODEPTRS_PER_BLOCK(root) - 3)
return 0;
if (ret < 0)
return ret;