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

Liu Yuan namei.unix at gmail.com
Wed Aug 14 06:53:18 CEST 2013


On Tue, Aug 13, 2013 at 06:54:11PM +0900, MORITA Kazutaka wrote:
> 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
> 
> -- 

Applied thanks

Yuan



More information about the sheepdog mailing list