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.kazut...@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

-- 
sheepdog mailing list
sheepdog@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to