[sheepdog] [PATCH] plain_store: use lower log priority when sha1 not cached

MORITA Kazutaka morita.kazutaka at gmail.com
Tue Aug 13 11:54:11 CEST 2013


From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>

This is actually not an error.  sd_debug() is more appropriate.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/plain_store.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sheep/plain_store.c b/sheep/plain_store.c
index c9a077e..6a2ee56 100644
--- a/sheep/plain_store.c
+++ b/sheep/plain_store.c
@@ -486,7 +486,10 @@ static int get_object_sha1(char *path, uint8_t *sha1)
 {
 	if (getxattr(path, SHA1NAME, sha1, SHA1_DIGEST_SIZE)
 	    != SHA1_DIGEST_SIZE) {
-		sd_err("fail to get sha1, %s", path);
+		if (errno == ENODATA)
+			sd_debug("sha1 is not cached yet, %s", path);
+		else
+			sd_err("fail to get xattr, %s", path);
 		return -1;
 	}
 
-- 
1.7.9.5




More information about the sheepdog mailing list