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

Ruoyu liangry at ucweb.com
Thu Jul 24 09:25:22 CEST 2014


On 2014年07月24日 15:19, Hitoshi Mitake wrote:
> At Thu, 24 Jul 2014 14:24:02 +0800,
> Ruoyu wrote:
>>
>> On 2014年07月24日 12:41, Hitoshi Mitake wrote:
>>> 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.
>> OK.
>>
>> BTW, just a remind, It seems nothing changed when I tried to pull the 
>> repository. Could you please help to check it?
> Could you check again? Sorry.
It works, thanks.
>
> Thanks,
> Hitoshi
>
>>> 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
>>
>> -- 
>> sheepdog mailing list
>> sheepdog at lists.wpkg.org
>> http://lists.wpkg.org/mailman/listinfo/sheepdog





More information about the sheepdog mailing list