[sheepdog] [RFC PATCH] farm: don't check of the existing object before slice_write
Liu Yuan
namei.unix at gmail.com
Fri Jul 19 07:17:53 CEST 2013
On Fri, Jul 19, 2013 at 02:09:23PM +0900, MORITA Kazutaka wrote:
> At Fri, 19 Jul 2013 13:02:54 +0800,
> Liu Yuan wrote:
> >
> > On Fri, Jul 19, 2013 at 01:33:16PM +0900, MORITA Kazutaka wrote:
> > > Currently, we stores sliced objects for the farm store, so
> > > sha1_file_exist() fails always.
> > >
> > > Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> > > ---
> > >
> > > Other approaches are:
> > >
> > > - Calculate the sha1 digest before slicing objects and store the
> > > value to the farm store so that sha1_file_exist() can check it.
> > >
> > > - Make sheep return the hash value of the sliced data.
> > >
> > > Any suggestions?
> >
> > I don't understand this patch. Does it solve any exsiting problem?
> > Why sha1_file_exist() will fail? Every object will have a unquie sha1 as
> > before after stored into farm.
>
> Farm stores only sliced objects, no? sd_read_object_sha1() calculates
> a sha1 digest against a whole object (not sliced data).
>
Ah, I see the point. For a quick thought, there won't be many objects with the
same content in images, so removing pre-check looks fine.
Thanks
Yuan
More information about the sheepdog
mailing list