[Sheepdog] [PATCH] collie: remove epoch request stuff

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Fri May 7 12:59:54 CEST 2010


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 collie/collie.h          |    2 --
 collie/net.c             |    4 ----
 collie/store.c           |   23 -----------------------
 include/sheepdog_proto.h |   26 +-------------------------
 4 files changed, 1 insertions(+), 54 deletions(-)

diff --git a/collie/collie.h b/collie/collie.h
index bd6a1a6..b52e457 100644
--- a/collie/collie.h
+++ b/collie/collie.h
@@ -137,8 +137,6 @@ void store_queue_request(struct work *work, int idx);
 
 int read_epoch(uint32_t *epoch, uint64_t *ctime,
 	       struct sheepdog_node_list_entry *entries, int *nr_entries);
-void epoch_queue_request(struct work *work, int idx);
-
 void cluster_queue_request(struct work *work, int idx);
 
 int update_epoch_store(uint32_t epoch);
diff --git a/collie/net.c b/collie/net.c
index f334c5e..9cc87b9 100644
--- a/collie/net.c
+++ b/collie/net.c
@@ -169,7 +169,6 @@ static void queue_request(struct request *req)
 		case SD_OP_STAT_CLUSTER:
 		case SD_OP_MAKE_FS:
 		case SD_OP_GET_NODE_LIST:
-		case SD_OP_READ_EPOCH:
 		case SD_OP_READ_VDIS:
 			break;
 		default:
@@ -194,9 +193,6 @@ static void queue_request(struct request *req)
 	case SD_OP_GET_OBJ_LIST:
 		req->work.fn = store_queue_request;
 		break;
-	case SD_OP_READ_EPOCH:
-		req->work.fn = epoch_queue_request;
-		break;
 	case SD_OP_GET_NODE_LIST:
 	case SD_OP_GET_VM_LIST:
 	case SD_OP_NEW_VDI:
diff --git a/collie/store.c b/collie/store.c
index f10a8ec..3277ad9 100644
--- a/collie/store.c
+++ b/collie/store.c
@@ -1775,29 +1775,6 @@ int read_epoch(uint32_t *epoch, uint64_t *ctime,
 	return SD_RES_SUCCESS;
 }
 
-void epoch_queue_request(struct work *work, int idx)
-{
-	struct request *req = container_of(work, struct request, work);
-	int ret = SD_RES_SUCCESS, n;
-	struct sd_epoch_req *hdr = (struct sd_epoch_req *)&req->rq;
-	struct sd_epoch_rsp *rsp = (struct sd_epoch_rsp *)&req->rp;
-	uint32_t opcode = hdr->opcode;
-	struct sheepdog_node_list_entry *entries;
-
-	switch (opcode) {
-	case SD_OP_READ_EPOCH:
-		entries = req->data;
-		n = hdr->data_length / sizeof(*entries);
-		ret = read_epoch(&rsp->latest_epoch, &rsp->ctime, entries, &n);
-		rsp->data_length = n * sizeof(*entries);
-		break;
-	}
-	if (ret != SD_RES_SUCCESS) {
-		dprintf("failed, %d, %x, %x\n", idx, opcode, ret);
-		rsp->result = ret;
-	}
-}
-
 int set_global_nr_copies(uint32_t copies)
 {
 	return attr(epoch_path, ANAME_COPIES, &copies, sizeof(copies), 1);
diff --git a/include/sheepdog_proto.h b/include/sheepdog_proto.h
index 10eee8d..2fa217a 100644
--- a/include/sheepdog_proto.h
+++ b/include/sheepdog_proto.h
@@ -35,8 +35,7 @@
 #define SD_OP_UPDATE_EPOCH   0x22
 #define SD_OP_GET_EPOCH      0x23
 #define SD_OP_SHUTDOWN       0x24
-#define SD_OP_READ_EPOCH     0x25
-#define SD_OP_READ_VDIS      0x26
+#define SD_OP_READ_VDIS      0x25
 
 #define SD_OP_DEBUG_INC_NVER 0xA0
 #define SD_OP_DEBUG_SET_NODE 0xA1
@@ -115,29 +114,6 @@ struct sd_rsp {
 	uint32_t	opcode_specific[7];
 };
 
-struct sd_epoch_req {
-	uint8_t		proto_ver;
-	uint8_t		opcode;
-	uint16_t	flags;
-	uint32_t	epoch;
-	uint32_t        id;
-	uint32_t        data_length;
-	uint32_t	pad[8];
-};
-
-struct sd_epoch_rsp {
-	uint8_t		proto_ver;
-	uint8_t		opcode;
-	uint16_t	flags;
-	uint32_t	epoch;
-	uint32_t        id;
-	uint32_t        data_length;
-	uint32_t        result;
-	uint32_t        latest_epoch;
-	uint64_t        ctime;
-	uint32_t	pad[4];
-};
-
 struct sd_so_req {
 	uint8_t		proto_ver;
 	uint8_t		opcode;
-- 
1.5.6.5




More information about the sheepdog mailing list