[Sheepdog] [PATCH v2 3/3] sheep: rename get/set_global_nr_copies()
Liu Yuan
namei.unix at gmail.com
Thu Oct 20 10:24:12 CEST 2011
From: Liu Yuan <tailai.ly at taobao.com>
Unify sheepdog_config APIs.
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
sheep/group.c | 6 +++---
sheep/sheep_priv.h | 4 ++--
sheep/store.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sheep/group.c b/sheep/group.c
index a6d28ab..7e4531d 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -613,7 +613,7 @@ join_finished:
}
/* Fresh node */
if (!sys_stat_ok() && !sys_stat_halt()) {
- set_global_nr_copies(sys->nr_sobjs);
+ set_cluster_copies(sys->nr_sobjs);
set_cluster_flags(sys->flags);
set_cluster_ctime(msg->ctime);
}
@@ -758,7 +758,7 @@ static void __sd_notify_done(struct cpg_event *cevent)
eprintf("can't write epoch %u\n", sys->epoch);
update_epoch_store(sys->epoch);
- set_global_nr_copies(sys->nr_sobjs);
+ set_cluster_copies(sys->nr_sobjs);
set_cluster_flags(sys->flags);
if (sys_flag_nohalt())
@@ -961,7 +961,7 @@ static int send_join_request(struct sheepdog_node_list_entry *ent)
msg.header.msg_length = sizeof(msg);
msg.header.from = *ent;
- get_global_nr_copies(&msg.nr_sobjs);
+ get_cluster_copies(&msg.nr_sobjs);
get_cluster_flags(&msg.cluster_flags);
nr_entries = ARRAY_SIZE(msg.nodes);
diff --git a/sheep/sheep_priv.h b/sheep/sheep_priv.h
index 26e0a53..3061801 100644
--- a/sheep/sheep_priv.h
+++ b/sheep/sheep_priv.h
@@ -198,8 +198,8 @@ void cluster_queue_request(struct work *work, int idx);
int update_epoch_store(uint32_t epoch);
-int set_global_nr_copies(uint32_t copies);
-int get_global_nr_copies(uint32_t *copies);
+int set_cluster_copies(uint32_t copies);
+int get_cluster_copies(uint32_t *copies);
int set_cluster_flags(uint16_t flags);
int get_cluster_flags(uint16_t *flags);
diff --git a/sheep/store.c b/sheep/store.c
index f304f2c..be8478f 100644
--- a/sheep/store.c
+++ b/sheep/store.c
@@ -2043,7 +2043,7 @@ int read_epoch(uint32_t *epoch, uint64_t *ctime,
return SD_RES_SUCCESS;
}
-int set_global_nr_copies(uint32_t copies)
+int set_cluster_copies(uint32_t copies)
{
int fd, ret;
@@ -2062,7 +2062,7 @@ int set_global_nr_copies(uint32_t copies)
return SD_RES_SUCCESS;
}
-int get_global_nr_copies(uint32_t *copies)
+int get_cluster_copies(uint32_t *copies)
{
int fd, ret;
--
1.7.6.1
More information about the sheepdog
mailing list