[sheepdog] [PATCH 2/2] don't set hdr->epoch for non peer requests

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Oct 18 14:01:27 CEST 2012


The field is used only for internal protocols.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 collie/cluster.c |    3 ---
 collie/debug.c   |    3 ---
 collie/node.c    |    1 -
 collie/vdi.c     |    1 -
 sheep/group.c    |    1 -
 5 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/collie/cluster.c b/collie/cluster.c
index 3d0a54a..385ffff 100644
--- a/collie/cluster.c
+++ b/collie/cluster.c
@@ -348,7 +348,6 @@ static int cluster_force_recover(int argc, char **argv)
 	}
 
 	sd_init_req(&hdr, SD_OP_FORCE_RECOVER);
-	hdr.epoch = sd_epoch;
 
 	ret = send_light_req(&hdr, sdhost, sdport);
 	if (ret) {
@@ -365,7 +364,6 @@ static int cluster_disable_recover(int argc, char **argv)
 	struct sd_req hdr;
 
 	sd_init_req(&hdr, SD_OP_DISABLE_RECOVER);
-	hdr.epoch = sd_epoch;
 
 	ret = send_light_req(&hdr, sdhost, sdport);
 	if (ret)
@@ -381,7 +379,6 @@ static int cluster_enable_recover(int argc, char **argv)
 	struct sd_req hdr;
 
 	sd_init_req(&hdr, SD_OP_ENABLE_RECOVER);
-	hdr.epoch = sd_epoch;
 
 	ret = send_light_req(&hdr, sdhost, sdport);
 	if (ret)
diff --git a/collie/debug.c b/collie/debug.c
index 6cbd715..11d5934 100644
--- a/collie/debug.c
+++ b/collie/debug.c
@@ -93,7 +93,6 @@ static int trace_read_buffer(void)
 read_buffer:
 	sd_init_req(&hdr, SD_OP_TRACE_READ_BUF);
 	hdr.data_length = TRACE_BUF_LEN;
-	hdr.epoch = sd_epoch;
 
 	ret = exec_req(fd, &hdr, buf);
 
@@ -131,7 +130,6 @@ static int trace_start(int argc, char **argv)
 	struct sd_rsp *rsp = (struct sd_rsp *)&hdr;
 
 	sd_init_req(&hdr, SD_OP_TRACE);
-	hdr.epoch = sd_epoch;
 	hdr.data_length = 1;
 
 	ret = send_light_req(&hdr, sdhost, sdport);
@@ -151,7 +149,6 @@ static int trace_stop(int argc, char **argv)
 	struct sd_rsp *rsp = (struct sd_rsp *)&hdr;
 
 	sd_init_req(&hdr, SD_OP_TRACE);
-	hdr.epoch = sd_epoch;
 	hdr.data_length = 0;
 
 	ret = send_light_req(&hdr, sdhost, sdport);
diff --git a/collie/node.c b/collie/node.c
index 68e4afd..2b1816b 100644
--- a/collie/node.c
+++ b/collie/node.c
@@ -68,7 +68,6 @@ static int node_info(int argc, char **argv)
 		addr_to_str(host, sizeof(host), sd_nodes[i].nid.addr, 0);
 
 		sd_init_req((struct sd_req *)&req, SD_OP_STAT_SHEEP);
-		req.epoch = sd_epoch;
 
 		ret = send_light_req((struct sd_req *)&req, host,
 				     sd_nodes[i].nid.port);
diff --git a/collie/vdi.c b/collie/vdi.c
index 7ca3237..9cedfac 100644
--- a/collie/vdi.c
+++ b/collie/vdi.c
@@ -886,7 +886,6 @@ again:
 		goto error;
 
 	sd_init_req(&hdr, SD_OP_STAT_CLUSTER);
-	hdr.epoch = sd_epoch;
 	hdr.data_length = log_length;
 
 	ret = exec_req(fd, &hdr, logs);
diff --git a/sheep/group.c b/sheep/group.c
index 8f16bc4..e9feaf6 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -623,7 +623,6 @@ static int get_vdis_from(struct sd_node *node)
 	}
 
 	sd_init_req(&hdr, SD_OP_GET_VDI_COPIES);
-	hdr.epoch = sys->epoch;
 	hdr.data_length = rlen;
 	ret = sheep_exec_req(&node->nid, &hdr, (char *)vc);
 	if (ret != SD_RES_SUCCESS)
-- 
1.7.2.5




More information about the sheepdog mailing list