[sheepdog] [PATCH v2 5/6] store: remove update_epoch_store()
Liu Yuan
namei.unix at gmail.com
Sat May 19 17:11:24 CEST 2012
From: Liu Yuan <tailai.ly at taobao.com>
It is no longer used after simple store is removed
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
sheep/group.c | 4 ----
sheep/ops.c | 3 ---
sheep/sheep_priv.h | 1 -
sheep/store.c | 11 -----------
4 files changed, 19 deletions(-)
diff --git a/sheep/group.c b/sheep/group.c
index 520ba21..5afe526 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -672,7 +672,6 @@ static void update_cluster_info(struct join_message *msg,
if (msg->inc_epoch) {
uatomic_inc(&sys->epoch);
update_epoch_log(sys->epoch, sys->nodes, sys->nr_nodes);
- update_epoch_store(sys->epoch);
}
/* Fresh node */
if (!sys_stat_ok() && !sys_stat_halt()) {
@@ -1258,7 +1257,6 @@ void sd_join_handler(struct sd_node *joined, struct sd_node *members,
if (nr_local == nr + nr_leave) {
sys_stat_set(SD_STATUS_OK);
update_epoch_log(sys->epoch, sys->nodes, sys->nr_nodes);
- update_epoch_store(sys->epoch);
}
break;
case CJ_RES_MASTER_TRANSFER:
@@ -1295,7 +1293,6 @@ void sd_join_handler(struct sd_node *joined, struct sd_node *members,
if (nr_local == nr + nr_leave) {
sys_stat_set(SD_STATUS_OK);
update_epoch_log(sys->epoch, sys->nodes, sys->nr_nodes);
- update_epoch_store(sys->epoch);
}
if (node_eq(joined, &sys->this_node))
@@ -1323,7 +1320,6 @@ void sd_leave_handler(struct sd_node *left, struct sd_node *members,
if (sys_can_recover()) {
uatomic_inc(&sys->epoch);
- update_epoch_store(sys->epoch);
update_epoch_log(sys->epoch, sys->nodes, sys->nr_nodes);
}
diff --git a/sheep/ops.c b/sheep/ops.c
index a0461c9..4ce9fba 100644
--- a/sheep/ops.c
+++ b/sheep/ops.c
@@ -255,8 +255,6 @@ static int cluster_make_fs(const struct sd_req *req, struct sd_rsp *rsp,
if (ret)
return SD_RES_EIO;
- update_epoch_store(sys->epoch);
-
set_cluster_copies(sys->nr_copies);
set_cluster_flags(sys->flags);
@@ -502,7 +500,6 @@ static int cluster_manual_recover(const struct sd_req *req, struct sd_rsp *rsp,
sys->epoch--;
goto out;
}
- update_epoch_store(sys->epoch);
sys_stat_set(s);
out:
return ret;
diff --git a/sheep/sheep_priv.h b/sheep/sheep_priv.h
index 3aade23..21ee282 100644
--- a/sheep/sheep_priv.h
+++ b/sheep/sheep_priv.h
@@ -274,7 +274,6 @@ int forward_write_obj_req(struct request *req);
int read_epoch(uint32_t *epoch, uint64_t *ctime,
struct sd_node *entries, int *nr_entries);
-int update_epoch_store(uint32_t epoch);
int update_epoch_log(uint32_t epoch, struct sd_node *nodes, size_t nr_nodes);
int set_cluster_copies(uint8_t copies);
diff --git a/sheep/store.c b/sheep/store.c
index 346161c..4b6d8c5 100644
--- a/sheep/store.c
+++ b/sheep/store.c
@@ -248,17 +248,6 @@ out:
return ret;
}
-int update_epoch_store(uint32_t epoch)
-{
- if (!strcmp(sd_store->name, "simple")) {
- char new[1024];
-
- snprintf(new, sizeof(new), "%s%08u/", obj_path, epoch);
- mkdir(new, def_dmode);
- }
- return 0;
-}
-
int update_epoch_log(uint32_t epoch, struct sd_node *nodes, size_t nr_nodes)
{
int fd, ret, len;
--
1.7.10.2
More information about the sheepdog
mailing list