[sheepdog] [PATCH] dog: compare copies with zones_nr instead of nodes_nr when format

Hitoshi Mitake mitake.hitoshi at gmail.com
Wed Jul 22 07:01:29 CEST 2015


At Wed, 22 Jul 2015 12:38:48 +0800,
Meng Lingkun wrote:
> 
> From: Meng Lingkun <menglingkun at cmss.chinamobile.com>
> 
> Since cluster stores data in different nodes with different zones,
> So fix it.
> 
> Signed-off-by: Meng Lingkun <menglingkun at cmss.chinamobile.com>
> ---
>  dog/cluster.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.
Hitoshi

> 
> diff --git a/dog/cluster.c b/dog/cluster.c
> index ef854d5..696d249 100644
> --- a/dog/cluster.c
> +++ b/dog/cluster.c
> @@ -130,12 +130,12 @@ static int cluster_format(int argc, char **argv)
>  		}
>  	}
>  
> -	if (cluster_cmd_data.copies > sd_nodes_nr) {
> +	if (cluster_cmd_data.copies > sd_zones_nr) {
>  		char info[1024];
>  		snprintf(info, sizeof(info), "Number of copies (%d) is larger "
> -			 "than number of nodes (%d).\n"
> +			 "than number of zones (%d).\n"
>  			 "Are you sure you want to continue? [yes/no]: ",
> -			 cluster_cmd_data.copies, sd_nodes_nr);
> +			 cluster_cmd_data.copies, sd_zones_nr);
>  		confirm(info);
>  	}
>  
> -- 
> 1.7.1
> 
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/sheepdog


More information about the sheepdog mailing list