[Sheepdog] [PATCH] sheep: disable object cache by default

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed May 9 14:02:55 CEST 2012


At Wed, 09 May 2012 18:16:09 +0800,
Liu Yuan wrote:
> 
> On 05/08/2012 01:48 AM, MORITA Kazutaka wrote:
> 
> > For example:
> > 
> >   $ qemu-img convert ~/linux.img sheepdog:linux
> >   $ collie vdi read linux 0 512 | hd | head -1
> >   00000000  fa eb 7c 6c 62 61 4c 49  4c 4f 01 00 15 04 09 00  |..|lbaLILO......|
> >   $ qemu-img snapshot -c snap sheepdog:linux
> >   $ collie vdi read linux 0 512 | hd | head -1
> >   00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> > 
> > We cannot read the correct data after snapshotting because the
> > snapshot operation doesn't read the cached data.
> 
> 
> I am surprised you didn't notice that qemu-img convert use 'unsafe' mode

Of course, I know that.  The problem here is that writethrough
requests does not read the latest data if the data is not flushed.
This is a completely wrong behavior as a block storage system, and
that's the very reason I want to disable it by default.

> as default, this means it tells sheepdog block driver NOT flush it at
> all. So should we flush the cache even users asks us explicitly NOT to?
> 
> Again, to remind that qemu-img snapshot doesn't accept a -t option at
> all for now.
> 
> Thanks,
> Yuan



More information about the sheepdog mailing list