[Sheepdog] [PATCH 1/6] collie: make the master node read global_nr_copies in __sd_confchg

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue May 4 21:20:05 CEST 2010


When there is only one node in the sheepdog cluster, the master node
doesn't get join messages, so it should read the global number of object
copies by itself.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 collie/collie.h |    2 +-
 collie/group.c  |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/collie/collie.h b/collie/collie.h
index db4fd5c..8589273 100644
--- a/collie/collie.h
+++ b/collie/collie.h
@@ -78,7 +78,7 @@ struct cluster_info {
 
 	DECLARE_BITMAP(vdi_inuse, SD_NR_VDIS);
 
-	int nr_sobjs;
+	uint32_t nr_sobjs;
 
 	struct list_head cpg_event_siblings;
 	struct cpg_event *cur_cevent;
diff --git a/collie/group.c b/collie/group.c
index b9f87b1..4bf1eeb 100644
--- a/collie/group.c
+++ b/collie/group.c
@@ -1099,6 +1099,7 @@ static void __sd_confchg(struct cpg_event *cevent)
 	    w->joined_list_entries - w->left_list_entries &&
 	    is_my_cpg_addr(w->member_list)) {
 		sys->join_finished = 1;
+		get_global_nr_copies(&sys->nr_sobjs);
 		w->first_cpg_node = 1;
 	}
 
-- 
1.5.6.5




More information about the sheepdog mailing list