[sheepdog] [PATCH 2/2] sheep: fix local_get_epoch()

Liu Yuan namei.unix at gmail.com
Mon Jun 25 13:06:56 CEST 2012


On 06/25/2012 06:56 PM, Christoph Hellwig wrote:
> On Sun, Jun 24, 2012 at 07:34:42PM +0800, Liu Yuan wrote:
>> From: Liu Yuan <tailai.ly at taobao.com>
>>
>> We should also add the piggybacked ctime to the length
> 
> Ooh.  I think this needs some more fixes over sheepdog.  For one
> epoch_log_read should account for it directly when reading from the
> file, that is we need to be able to read SD_MAX_NODES + the time_t.
> 
> Probably better is to ignore the time in a plain epoch_log_read
> and require a separate call for it, that uses lseek to seek to the
> end of the file.  And epoch_log_read really needs a comment about
> this time piggybacking.
> 

Hmm, yes, looks good to me. We need add a separate call to abstract out
ctime handling, in order to exclude further improper use of
epoch_log_read().

Thanks,
Yuan




More information about the sheepdog mailing list