[Sheepdog] [PATCH] sheepdog: add some result codes

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed May 12 10:09:02 CEST 2010


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 block/sheepdog.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/block/sheepdog.c b/block/sheepdog.c
index eff4cb9..f21fd19 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -53,6 +53,9 @@
 #define SD_RES_FULL_VDI      0x13 /* we already have the maximum vdis */
 #define SD_RES_VER_MISMATCH  0x14 /* Protocol version mismatch */
 #define SD_RES_NO_SPACE      0x15 /* Server has no room for new objects */
+#define SD_RES_WAIT_FOR_FORMAT  0x16 /* Sheepdog is waiting for a format operation */
+#define SD_RES_WAIT_FOR_JOIN    0x17 /* Sheepdog is waiting for other nodes joining */
+#define SD_RES_JOIN_FAILED   0x18 /* Target node had failed to join sheepdog */
 
 /*
  * Object ID rules
@@ -327,6 +330,9 @@ static const char * sd_strerror(int err)
 		{SD_RES_FULL_VDI, "We already have the maximum vdis"},
 		{SD_RES_VER_MISMATCH, "Protocol version mismatch"},
 		{SD_RES_NO_SPACE, "Server has no space for new objects"},
+		{SD_RES_WAIT_FOR_FORMAT, "Sheepdog is waiting for a format operation"},
+		{SD_RES_WAIT_FOR_JOIN, "Sheepdog is waiting for other nodes joining"},
+		{SD_RES_JOIN_FAILED, "Target node had failed to join sheepdog"},
 	};
 
 	for (i = 0; i < ARRAY_SIZE(errors); ++i)
-- 
1.5.6.5




More information about the sheepdog mailing list