At Wed, 21 Dec 2011 00:22:03 +0800,
Liu Yuan wrote:
> 
> From: Liu Yuan <[email protected]>
> 
> We should propagate error out to the caller.
> 
> - remove whitespace in passing
> 
> Signed-off-by: Liu Yuan <[email protected]>
> ---
>  sheep/store.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)

Applied the first patch in this series, thanks!

The second one is probably okay, but it is not obvious that the patch
doesn't hurt the current object recovery.  I'll postpone it for 0.4.0.

Thanks,

Kazutaka

> 
> diff --git a/sheep/store.c b/sheep/store.c
> index 4c4f0da..fed74f8 100644
> --- a/sheep/store.c
> +++ b/sheep/store.c
> @@ -805,11 +805,13 @@ out:
>  
>  int epoch_log_read_nr(uint32_t epoch, char *buf, int len)
>  {
> -        int nr;
> +     int nr;
>  
> -        nr = epoch_log_read(epoch, buf, len);
> -        nr /= sizeof(struct sheepdog_node_list_entry);
> -        return nr;
> +     nr = epoch_log_read(epoch, buf, len);
> +     if (nr < 0)
> +             return nr;
> +     nr /= sizeof(struct sheepdog_node_list_entry);
> +     return nr;
>  }
>  
>  int epoch_log_read(uint32_t epoch, char *buf, int len)
> -- 
> 1.7.8.rc3
> 
> -- 
> sheepdog mailing list
> [email protected]
> http://lists.wpkg.org/mailman/listinfo/sheepdog
-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to