projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3ce9579
)
Keep more pointers free in the nodes for double splits
author
Chris Mason
<chris.mason@oracle.com>
Thu, 24 Apr 2008 14:18:25 +0000
(10:18 -0400)
committer
David Woodhouse
<dwmw2@hera.kernel.org>
Thu, 24 Apr 2008 14:18:25 +0000
(10:18 -0400)
ctree.c
patch
|
blob
|
history
diff --git
a/ctree.c
b/ctree.c
index
eea7936
..
184d842
100644
(file)
--- 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) >=
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)
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) <
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;
return 0;
if (ret < 0)
return ret;