[sheepdog] [PATCH v1 2/3] lib: make depth of ext-node right
Robin Dong
robin.k.dong at gmail.com
Fri Feb 14 07:45:58 CET 2014
From: Robin Dong <sanbai at taobao.com>
When depth of B-tree become 2, the value of 'depth' for ext-node
should be 1 (the 'depth' of idx-node is 2).
Signed-off-by: Robin Dong <sanbai at taobao.com>
---
lib/sd_inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sd_inode.c b/lib/sd_inode.c
index 68dfd28..4f5e8cf 100644
--- a/lib/sd_inode.c
+++ b/lib/sd_inode.c
@@ -556,7 +556,7 @@ static int insert_new_node(write_node_fn writer, read_node_fn reader,
panic("%s() B-tree is full!", __func__);
/* create a new ext-node */
leaf_node = xvalloc(SD_INODE_DATA_INDEX_SIZE);
- sd_inode_init(leaf_node, 2);
+ sd_inode_init(leaf_node, 1);
oid = vid_to_btree_oid(inode->vdi_id,
inode->btree_counter++);
insert_ext_entry_nosearch(leaf_node,
--
1.7.12.4
More information about the sheepdog
mailing list