[sheepdog] [PATCH v2 6/7] trace: change the opcode name

Liu Yuan namei.unix at gmail.com
Thu Aug 30 11:39:03 CEST 2012


From: Liu Yuan <tailai.ly at taobao.com>

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 collie/debug.c           |    2 +-
 include/internal_proto.h |    2 +-
 sheep/ops.c              |    8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/collie/debug.c b/collie/debug.c
index f16a8dc..250a131 100644
--- a/collie/debug.c
+++ b/collie/debug.c
@@ -92,7 +92,7 @@ static int trace_read_buffer(void)
 		return EXIT_SYSFAIL;
 
 read_buffer:
-	sd_init_req(&hdr, SD_OP_TRACE_CAT);
+	sd_init_req(&hdr, SD_OP_TRACE_READ_BUF);
 	hdr.data_length = rlen = TRACE_BUF_LEN;
 	hdr.epoch = sd_epoch;
 
diff --git a/include/internal_proto.h b/include/internal_proto.h
index c1d116a..5288823 100644
--- a/include/internal_proto.h
+++ b/include/internal_proto.h
@@ -48,7 +48,7 @@
 #define SD_OP_GET_SNAP_FILE  0x93
 #define SD_OP_CLEANUP        0x94
 #define SD_OP_TRACE          0x95
-#define SD_OP_TRACE_CAT      0x96
+#define SD_OP_TRACE_READ_BUF 0x96
 #define SD_OP_STAT_RECOVERY  0x97
 #define SD_OP_FLUSH_DEL_CACHE  0x98
 #define SD_OP_NOTIFY_VDI_DEL 0x99
diff --git a/sheep/ops.c b/sheep/ops.c
index c2886a0..6e1936a 100644
--- a/sheep/ops.c
+++ b/sheep/ops.c
@@ -671,7 +671,7 @@ static int local_trace_ops(const struct sd_req *req, struct sd_rsp *rsp, void *d
 	return ret;
 }
 
-static int local_trace_cat_ops(const struct sd_req *req, struct sd_rsp *rsp,
+static int local_trace_read_buf(const struct sd_req *req, struct sd_rsp *rsp,
 			       void *data)
 {
 	rsp->data_length = trace_buffer_pop(data, req->data_length);
@@ -1083,11 +1083,11 @@ static struct sd_op_template sd_ops[] = {
 		.process_main = local_trace_ops,
 	},
 
-	[SD_OP_TRACE_CAT] = {
-		.name = "TRACE_CAT",
+	[SD_OP_TRACE_READ_BUF] = {
+		.name = "TRACE_READ_BUF",
 		.type = SD_OP_TYPE_LOCAL,
 		.force = 1,
-		.process_main = local_trace_cat_ops,
+		.process_main = local_trace_read_buf,
 	},
 
 	[SD_OP_KILL_NODE] = {
-- 
1.7.10.2




More information about the sheepdog mailing list