[sheepdog] [PATCH] dog: read the latest epoch is enough in cluster_alter_copy

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Thu Jul 24 06:41:58 CEST 2014


At Thu, 24 Jul 2014 11:13:50 +0800,
Ruoyu wrote:
> 
> Because the purpose is to get the copy policy and the number of
> copies only, reading the latest epoch is nice. No need to read
> all epoch records.
> 
> Signed-off-by: Ruoyu <liangry at ucweb.com>
> ---
>  dog/cluster.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks. It is nice if you can write test cases for the
feature of alter copy.

Thanks,
Hitoshi

> 
> diff --git a/dog/cluster.c b/dog/cluster.c
> index 3d7cd32..ba44ad9 100644
> --- a/dog/cluster.c
> +++ b/dog/cluster.c
> @@ -605,7 +605,7 @@ static int cluster_alter_copy(int argc, char **argv)
>  		confirm(info);
>  	}
>  
> -	log_length = sd_epoch * sizeof(struct epoch_log);
> +	log_length = sizeof(struct epoch_log);
>  	logs = xmalloc(log_length);
>  	sd_init_req(&hdr, SD_OP_STAT_CLUSTER);
>  	hdr.data_length = log_length;
> -- 
> 1.8.3.2
> 
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog



More information about the sheepdog mailing list