[Sheepdog] [PATCH 1/2] sheep: fix SD_FLAG_XXX collision

Liu Yuan namei.unix at gmail.com
Tue Jan 17 10:04:27 CET 2012


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

SD_FLAG_NOHALT and SD_FLAG_CMD_WRITE use the same value. This is wrong.

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 include/sheep.h          |    2 --
 include/sheepdog_proto.h |    5 +++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/sheep.h b/include/sheep.h
index 4f2f1dc..fc86c25 100644
--- a/include/sheep.h
+++ b/include/sheep.h
@@ -63,8 +63,6 @@
 #define SD_RES_INVALID_CTIME 0x44 /* Creation time of sheepdog is different */
 #define SD_RES_INVALID_EPOCH 0x45 /* Invalid epoch */
 
-#define SD_FLAG_NOHALT       0x0001 /* Server the IO rquest even lack of nodes */
-
 struct sd_so_req {
 	uint8_t		proto_ver;
 	uint8_t		opcode;
diff --git a/include/sheepdog_proto.h b/include/sheepdog_proto.h
index 2d0d5ec..a242766 100644
--- a/include/sheepdog_proto.h
+++ b/include/sheepdog_proto.h
@@ -30,8 +30,9 @@
 #define SD_OP_GET_VDI_INFO   0x14
 #define SD_OP_READ_VDIS      0x15
 
-#define SD_FLAG_CMD_WRITE    0x01
-#define SD_FLAG_CMD_COW      0x02
+#define SD_FLAG_CMD_WRITE    0x0001
+#define SD_FLAG_CMD_COW      0x0002
+#define SD_FLAG_NOHALT       0x0004 /* Serve the IO rquest even lack of nodes */
 
 #define SD_RES_SUCCESS       0x00 /* Success */
 #define SD_RES_UNKNOWN       0x01 /* Unknown error */
-- 
1.7.8.2




More information about the sheepdog mailing list