[sheepdog] [PATCH v4 8/7] sheep: handle SD_RES_NETWORK_ERROR in io_op_done

Liu Yuan namei.unix at gmail.com
Wed Apr 3 17:12:02 CEST 2013


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

MD would return SD_RES_NETWORK_ERROR in io threads, so let's handle it.

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 sheep/request.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sheep/request.c b/sheep/request.c
index bd0f170..0d6ed95 100644
--- a/sheep/request.c
+++ b/sheep/request.c
@@ -61,9 +61,10 @@ static void io_op_done(struct work *work)
 		leave_cluster();
 		break;
 	case SD_RES_SUCCESS:
+	case SD_RES_NETWORK_ERROR:
 		break;
 	default:
-		sd_dprintf("unhandled error %d", req->rp.result);
+		sd_dprintf("unhandled error %x", req->rp.result);
 		break;
 	}
 
@@ -133,7 +134,7 @@ static void gateway_op_done(struct work *work)
 	case SD_RES_SUCCESS:
 		break;
 	default:
-		sd_dprintf("unhandled error %d", req->rp.result);
+		sd_dprintf("unhandled error %x", req->rp.result);
 		break;
 	}
 
-- 
1.7.9.5




More information about the sheepdog mailing list