[sheepdog] [PATCH 2/2] recovery: fix tgt_epoch chaos

Liu Yuan namei.unix at gmail.com
Wed May 29 10:37:01 CEST 2013


On 05/29/2013 04:35 PM, MORITA Kazutaka wrote:
> At Tue, 28 May 2013 14:17:51 +0800,
> Liu Yuan wrote:
>>
>> tgt_epoch is the epoch of highest epoch from where we try to recover object. We
>> can't simply assign it as the sys->epoch. This won't cause fatal problem because
>> we'll tgt_epoch--, but will cause unnecessary recovery requests that mostly fail
>>
>> This patch adds a new field tgt_epoch to mean exactly it.
>>
>> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
>> ---
>>  include/sheep.h  |    2 ++
>>  sheep/recovery.c |   11 +++++++----
>>  2 files changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/sheep.h b/include/sheep.h
>> index e917064..38a750d 100644
>> --- a/include/sheep.h
>> +++ b/include/sheep.h
>> @@ -34,6 +34,8 @@ struct vnode_info {
>>  
>>  	int nr_zones;
>>  	int refcnt;
>> +
>> +	uint32_t epoch;
>>  };
> 
> Do we need to add this field to vnode_info?
> 

Oops, I just tried to add it in the vnode_info first and found that
couldn't help solve the problem. then I added it to recover work
structure. I'll remove in v2.

Thanks,
Yuan




More information about the sheepdog mailing list