From: HaiTing Yao <wujue.yht at taobao.com> Node maybe need read all of the bitmaps when the epoch is not zero. This perhaps occurs when we restart the shutdown cluster or join one once existed node. Usually, node need not read many copies of bitmap. If the cluster status is OK and the node status is waiting for format, node just need read one bitamp. Signed-off-by: HaiTing Yao <wujue.yht at taobao.com> --- sheep/group.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) changes from v1: After cluster shutdown, need read all copies diff --git a/sheep/group.c b/sheep/group.c index c7fd387..d09563b 100644 --- a/sheep/group.c +++ b/sheep/group.c @@ -720,9 +720,13 @@ static void __sd_join(struct event_struct *cevent) if (sys_stat_ok()) return; - get_vdi_bitmap_from_sd_list(); - for (i = 0; i < w->member_list_entries; i++) - get_vdi_bitmap_from(w->member_list + i); + if (sys_stat_wait_format()) + get_vdi_bitmap_from(w->member_list); + else { + get_vdi_bitmap_from_sd_list(); + for (i = 0; i < w->member_list_entries; i++) + get_vdi_bitmap_from(w->member_list + i); + } } static void __sd_leave(struct event_struct *cevent) -- 1.7.1 |