[sheepdog] [PATCH 2/2] recovery: fix tgt_epoch chaos

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed May 29 10:35:00 CEST 2013


At Tue, 28 May 2013 14:17:51 +0800,
Liu Yuan wrote:
> 
> tgt_epoch is the epoch of highest epoch from where we try to recover object. We
> can't simply assign it as the sys->epoch. This won't cause fatal problem because
> we'll tgt_epoch--, but will cause unnecessary recovery requests that mostly fail
> 
> This patch adds a new field tgt_epoch to mean exactly it.
> 
> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> ---
>  include/sheep.h  |    2 ++
>  sheep/recovery.c |   11 +++++++----
>  2 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/include/sheep.h b/include/sheep.h
> index e917064..38a750d 100644
> --- a/include/sheep.h
> +++ b/include/sheep.h
> @@ -34,6 +34,8 @@ struct vnode_info {
>  
>  	int nr_zones;
>  	int refcnt;
> +
> +	uint32_t epoch;
>  };

Do we need to add this field to vnode_info?

Thanks,

Kazutaka



More information about the sheepdog mailing list