[sheepdog] [PATCH] sheep: fix bug for cluster format failed when exists gateway node

Liu Yuan namei.unix at gmail.com
Wed Mar 4 09:24:47 CET 2015


On Wed, Mar 04, 2015 at 12:18:35AM -0800, Wang Zhengyong wrote:
> This commit fix Bug #1427099
> https://bugs.launchpad.net/sheepdog-project/+bug/1427099
> "cluster format failed when exists gateway node"
> 
> The data length  should be the the size of variable rather than poriner
> In the 64-bit system the pointer size is 64bit, integer variable size is 32bit
> 
> Cc: Hitoshi Mitake <mitake.hitoshi at gmail.com>
> Signed-off-by: Wang Zhengyong <wangzhengyong at cmss.chinamobile.com>
> ---
>  sheep/ops.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/sheep/ops.c b/sheep/ops.c
> index 403c9b0..0e5ac64 100644
> --- a/sheep/ops.c
> +++ b/sheep/ops.c
> @@ -1531,7 +1531,7 @@ static int local_get_vnodes(struct request *req)
>  	int *nr_vnodes;
>  
>  	nr_vnodes = req->data;
> -	req->rp.data_length = sizeof(nr_vnodes);
> +	req->rp.data_length = sizeof(*nr_vnodes);
>  	*nr_vnodes = sys->this_node.nr_vnodes;
>  
>  	return SD_RES_SUCCESS;
> -- 
> 1.7.1
> 
> 
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/sheepdog

Hi Saeki Masaki,

   Could you please verify this patch against the problem?

Thanks,
Yuan



More information about the sheepdog mailing list