[sheepdog] [PATCH] sheep: remove unused variable in cluster_make_fs

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed Sep 5 01:23:59 CEST 2012


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/cluster/local.c |    5 ++++-
 sheep/ops.c           |    2 --
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sheep/cluster/local.c b/sheep/cluster/local.c
index 5d2f423..0a26c9e 100644
--- a/sheep/cluster/local.c
+++ b/sheep/cluster/local.c
@@ -230,8 +230,11 @@ static void add_event(enum local_event_type type, struct sd_node *node,
 	};
 
 	ev.buf_len = buf_len;
-	if (buf)
+	if (buf) {
+		if (buf_len > SD_MAX_EVENT_BUF_SIZE)
+			panic("ERROR: too big buf size %zd\n", buf_len);
 		memcpy(ev.buf, buf, buf_len);
+	}
 
 	ev.nr_nodes = get_nodes(ev.nodes, ev.pids);
 
diff --git a/sheep/ops.c b/sheep/ops.c
index 465d73f..7b25270 100644
--- a/sheep/ops.c
+++ b/sheep/ops.c
@@ -219,7 +219,6 @@ static int cluster_make_fs(const struct sd_req *req, struct sd_rsp *rsp,
 	int i, ret;
 	uint32_t latest_epoch;
 	uint64_t created_time;
-	struct siocb iocb = { 0 };
 	struct store_driver *driver;
 	char *store_name = data;
 
@@ -229,7 +228,6 @@ static int cluster_make_fs(const struct sd_req *req, struct sd_rsp *rsp,
 
 	sd_store = driver;
 	latest_epoch = get_latest_epoch();
-	iocb.epoch = latest_epoch;
 
 	ret = sd_store->format();
 	if (ret != SD_RES_SUCCESS)
-- 
1.7.2.5




More information about the sheepdog mailing list