[sheepdog] [PATCH] plain store: consolidate err_to_sderr

Liu Yuan namei.unix at gmail.com
Wed Jun 19 10:31:12 CEST 2013


We should not raise EIO handling of md layer as hard as we can. EEXIST is not a
fatal problem for most cases and even though upper layer should handle it
themselves, we can treat it as a trivial error as a safe guard here.

Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 sheep/plain_store.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/sheep/plain_store.c b/sheep/plain_store.c
index 5c3e275..9065209 100644
--- a/sheep/plain_store.c
+++ b/sheep/plain_store.c
@@ -89,6 +89,7 @@ static int err_to_sderr(char *path, uint64_t oid, int err)
 	case ENFILE:
 	case EINTR:
 	case EAGAIN:
+	case EEXIST:
 		sd_eprintf("%m, oid=%"PRIx64, oid);
 		/* make gateway try again */
 		return SD_RES_NETWORK_ERROR;
-- 
1.7.9.5




More information about the sheepdog mailing list