[sheepdog] [PATCH] recovery: use passed epoch in fetch_object_list()

Liu Yuan namei.unix at gmail.com
Wed May 29 10:38:26 CEST 2013


On 05/29/2013 04:36 PM, MORITA Kazutaka wrote:
> At Tue, 28 May 2013 14:24:08 +0800,
> Liu Yuan wrote:
>>
>> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
>> ---
>>  sheep/recovery.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/sheep/recovery.c b/sheep/recovery.c
>> index 2bd3a46..dba89fb 100644
>> --- a/sheep/recovery.c
>> +++ b/sheep/recovery.c
>> @@ -672,7 +672,7 @@ static uint64_t *fetch_object_list(struct sd_node *e, uint32_t epoch,
>>  retry:
>>  	sd_init_req(&hdr, SD_OP_GET_OBJ_LIST);
>>  	hdr.data_length = buf_size;
>> -	hdr.epoch = sys_epoch();
>> +	hdr.epoch = epoch;
>>  	ret = sheep_exec_req(&e->nid, &hdr, buf);
>>  
>>  	switch (ret) {
> 
> I think the epoch field is not used for non-peer requests.  Removing
> the line looks better to me.
> 

This assignment just enable sheep_exec_req() retry if network is busy.
Don't we need retry for fetch_object_list ?

Thanks,
Yuan




More information about the sheepdog mailing list