[sheepdog] [PATCH] sheep: correct current_vnode_info's initialization when recover disabled

Liu Yuan namei.unix at gmail.com
Sun Aug 5 14:05:36 CEST 2012


On 08/05/2012 07:24 PM, Yunkai Zhang wrote:
> From: Yunkai Zhang <qiushu.zyk at taobao.com>
> 
> After disabled recovery, a joining node needs to initialize current_vnode_info.
> Since it doesn't belong to the cluster before next recovery finished,
> current_vnode_info should be calculated excluding this node.
> 
> Signed-off-by: Yunkai Zhang <qiushu.zyk at taobao.com>
> ---
>  sheep/group.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sheep/group.c b/sheep/group.c
> index a686366..c281b65 100644
> --- a/sheep/group.c
> +++ b/sheep/group.c
> @@ -782,7 +782,7 @@ static void prepare_recovery(struct sd_node *joined,
>  	}
>  
>  	if (!current_vnode_info)
> -		current_vnode_info = alloc_vnode_info(nodes, nr_nodes);
> +		current_vnode_info = alloc_vnode_info(all_nodes, nr_all_nodes);
>  }
>  
>  void recalculate_vnodes(struct sd_node *nodes, int nr_nodes)
> 

Applied, thanks.

Yuan



More information about the sheepdog mailing list