On 11/15/2011 06:34 PM, Yibin Shen wrote:

> On Tue, Nov 15, 2011 at 6:16 PM, MORITA Kazutaka
> <[email protected]> wrote:
>> At Tue, 15 Nov 2011 10:25:41 +0800,
>> Yibin Shen wrote:
>>>
>>> Hi, kuzum:
>>>
>>> We wish to add other three features in 0.4.0 merge window,
>>>
>>> 1. object's R/W checksum support(which will be optional) for sheep I/O
>>> subsystem.
>>
>> How to store the checksum?  Will this feature be implemented on Yuan's
>> "farm"?
> we will create a checksum file for each object, and named with object
> name plus a  suffix,
> hmm, maybe this is conflicted with "farm" project,  I will talked it with 
> Yuan.

Not at all. Farm doesn't do with raw object. You can play with it on
farm as it is right now. But if we need checksum it, maybe we can create
a header for object.

|header|data...|

write(oid, buf, size)
{
        sha1 = get_sha1(buf, size);
        init_hdr(sha1, size)
        insert(buf, &hdr);
        write_object(odi, buf, size);
}

read(oid, buf, size)
{
        sha1 = get_sha1(read_file(oid), size, &hdr);
        verify_sha1(sha1, hdr.sha1);
        ....
}

Thanks,
Yuan
-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to