Signed-off-by: Christoph Hellwig <hch@lst.de>

---
 include/internal_proto.h |   17 +++++++++--------
 include/sheepdog_proto.h |    3 +++
 2 files changed, 12 insertions(+), 8 deletions(-)

Index: sheepdog/include/internal_proto.h
===================================================================
--- sheepdog.orig/include/internal_proto.h	2012-07-06 13:38:25.213234989 +0200
+++ sheepdog/include/internal_proto.h	2012-07-06 13:38:49.523234843 +0200
@@ -58,20 +58,21 @@
 #define SD_OP_WRITE_PEER     0xa5
 #define SD_OP_REMOVE_PEER    0xa6
 
-/* 0x0010 was SD_FLAG_CMD_IO_LOCAL */
-#define SD_FLAG_CMD_RECOVERY 0x0020
+/* internal flags for hdr.flags, must be above 0x80 */
+#define SD_FLAG_CMD_RECOVERY 0x0080
 
 /* flags for VDI attribute operations */
 #define SD_FLAG_CMD_CREAT    0x0100
 #define SD_FLAG_CMD_EXCL     0x0200
 #define SD_FLAG_CMD_DEL      0x0400
 
-#define SD_RES_OLD_NODE_VER  0x41 /* Remote node has an old epoch */
-#define SD_RES_NEW_NODE_VER  0x42 /* Remote node has a new epoch */
-#define SD_RES_NOT_FORMATTED 0x43 /* Sheepdog is not formatted yet */
-#define SD_RES_INVALID_CTIME 0x44 /* Creation time of sheepdog is different */
-#define SD_RES_INVALID_EPOCH 0x45 /* Invalid epoch */
-#define SD_RES_NETWORK_ERROR 0x81 /* Network error between sheep */
+/* internal error return values, must be above 0x80 */
+#define SD_RES_OLD_NODE_VER  0x81 /* Remote node has an old epoch */
+#define SD_RES_NEW_NODE_VER  0x82 /* Remote node has a new epoch */
+#define SD_RES_NOT_FORMATTED 0x83 /* Sheepdog is not formatted yet */
+#define SD_RES_INVALID_CTIME 0x84 /* Creation time of sheepdog is different */
+#define SD_RES_INVALID_EPOCH 0x85 /* Invalid epoch */
+#define SD_RES_NETWORK_ERROR 0x86 /* Network error between sheep */
 
 #define SD_FLAG_NOHALT       0x0004 /* Serve the IO rquest even lack of nodes */
 
Index: sheepdog/include/sheepdog_proto.h
===================================================================
--- sheepdog.orig/include/sheepdog_proto.h	2012-07-06 13:37:11.596568762 +0200
+++ sheepdog/include/sheepdog_proto.h	2012-07-06 13:38:49.523234843 +0200
@@ -34,6 +34,7 @@
 #define SD_FLAG_CMD_WRITE    0x01
 #define SD_FLAG_CMD_COW      0x02
 #define SD_FLAG_CMD_CACHE    0x04
+/* flags above 0x80 are sheepdog-internal */
 
 #define SD_RES_SUCCESS       0x00 /* Success */
 #define SD_RES_UNKNOWN       0x01 /* Unknown error */
@@ -67,6 +68,8 @@
 #define SD_RES_CLUSTER_RECOVERING 0x22 /* Cluster is recovering. */
 #define SD_RES_OBJ_RECOVERING     0x23 /* Object is recovering */
 
+/* errors above 0x80 are sheepdog-internal */
+
 /*
  * Object ID rules
  *


