Skip to contentSkip to conversation

sheepdog: show error message for halt status

PATCH Applied Liu Yuan 4 participants 4 messages Mar 18, 2013 Block layer

lore
Share & tools
lore

Liu Yuan

author
#0 lore raw

PATCH 1/1 sheepdog: show error message for halt status

From: Liu Yuan <[email protected]>

Sheepdog (neither quorum nor unsafe mode) will refuse to serve IO requests when number of alive nodes is less than that of copies specified by users. This will return 0x19 to QEMU client which currently doesn't recognize it.

This patch adds an error description when QEMU client receives it, other than plainly printing 'Invalid error code'

Cc MORITA Kazutaka <[email protected]>
Cc Kevin Wolf <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
---
 block/sheepdog.c |    2 ++
 1 file changed, 2 insertions(+)
block/sheepdog.c +2 -0
index 4245328..54d3e53 100644
@@ -65,6 +65,7 @@
 #define SD_RES_WAIT_FOR_FORMAT  0x16 /* Waiting for a format operation */
 #define SD_RES_WAIT_FOR_JOIN    0x17 /* Waiting for other nodes joining */
 #define SD_RES_JOIN_FAILED   0x18 /* Target node had failed to join sheepdog */
+#define SD_RES_HALT          0x19 /* Sheepdog is stopped serving IO request */
 
 /*
  * Object ID rules
@@ -344,6 +345,7 @@ static const char * sd_strerror(int err)
         {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"},
+        {SD_RES_HALT, "Sheepdog is stopped serving IO request"},
     };
 
     for (i = 0; i < ARRAY_SIZE(errors); ++i) {
Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw

At Mon, 18 Mar 2013 14:27:55 +0800,

Quoted 10 lines · Liu Yuan

From: Liu Yuan <[email protected]>

Sheepdog (neither quorum nor unsafe mode) will refuse to serve IO requests when number of alive nodes is less than that of copies specified by users. This will return 0x19 to QEMU client which currently doesn't recognize it.

This patch adds an error description when QEMU client receives it, other than plainly printing 'Invalid error code'

Quoted 7 lines
Cc MORITA Kazutaka <[email protected]>
Cc Kevin Wolf <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
---
 block/sheepdog.c |    2 ++
 1 file changed, 2 insertions(+)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Liu Yuan
Quoted 9 lines · Liu Yuan

From: Liu Yuan <[email protected]>

Sheepdog (neither quorum nor unsafe mode) will refuse to serve IO requests when number of alive nodes is less than that of copies specified by users. This will return 0x19 to QEMU client which currently doesn't recognize it.

This patch adds an error description when QEMU client receives it, other than plainly printing 'Invalid error code'

Quoted 7 lines
Cc MORITA Kazutaka <[email protected]>
Cc Kevin Wolf <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
---
 block/sheepdog.c |    2 ++
 1 file changed, 2 insertions(+)
Applied
#3 lore raw
In reply to Liu Yuan

Am 18.03.2013 um 07:27 hat Liu Yuan geschrieben:

Quoted 6 lines

From: Liu Yuan <[email protected]>

Sheepdog (neither quorum nor unsafe mode) will refuse to serve IO requests when number of alive nodes is less than that of copies specified by users. This will return 0x19 to QEMU client which currently doesn't recognize it.

Quoted 7 lines

This patch adds an error description when QEMU client receives it, other than plainly printing 'Invalid error code'

Cc MORITA Kazutaka <[email protected]>
Cc Kevin Wolf <[email protected]>
Cc Stefan Hajnoczi <[email protected]>

Thanks, applied to the block branch.

Kevin