[sheepdog] [PATCH] sheep: correct current_vnode_info's initialization when recover disabled
Yunkai Zhang
yunkai.me at gmail.com
Sun Aug 5 13:24:01 CEST 2012
From: Yunkai Zhang <qiushu.zyk at taobao.com>
After disabled recovery, a joining node needs to initialize current_vnode_info.
Since it doesn't belong to the cluster before next recovery finished,
current_vnode_info should be calculated excluding this node.
Signed-off-by: Yunkai Zhang <qiushu.zyk at taobao.com>
---
sheep/group.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sheep/group.c b/sheep/group.c
index a686366..c281b65 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -782,7 +782,7 @@ static void prepare_recovery(struct sd_node *joined,
}
if (!current_vnode_info)
- current_vnode_info = alloc_vnode_info(nodes, nr_nodes);
+ current_vnode_info = alloc_vnode_info(all_nodes, nr_all_nodes);
}
void recalculate_vnodes(struct sd_node *nodes, int nr_nodes)
--
1.7.11.2
More information about the sheepdog
mailing list