[sheepdog] [PATCH stable-0.6 3/4] plain store: consolidate err_to_sderr

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Thu Jul 4 11:46:32 CEST 2013


From: Liu Yuan <namei.unix at gmail.com>

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>
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/plain_store.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/sheep/plain_store.c b/sheep/plain_store.c
index 2545219..bcc3e5d 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.10.4




More information about the sheepdog mailing list