[sheepdog] [PATCH v1, RFC] sheep: writeback cache semantics in backend store
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Wed Aug 29 06:10:53 CEST 2012
At Wed, 29 Aug 2012 11:36:35 +0800,
Liu Yuan wrote:
> >
> > Adding a 'writeback' option is a bit confusing. Should we extend a
> > '-w' option so that we can specify types of caches we want to enable?
> >
>
> Basically this is a sync operation, as we don't want to confuse users by
> yet another writeback semantic, I'd suggest term it as sync operation.
> Then how about -w {wrtiethrough,writeback},{nosync}? First two used for
> object cache, and nosync used for backend. nosync means don't use D_SYNC
> flag for backend write. For e.g
> -w writeback,nosync means use object cache and no D_SYNC flag for backend
> -w nosync means no D_SYNC flag for backend
> -w writethough means use object cache but still use D_SYNC flag for
> backend write
I guess what sheep should do is only to specify what kinds of cache to
be turned on. Whether using writeback or writethrough should be
specified by a qemu command line, no?
'nosync' sounds dangerous though this patch provides right block
device semantics. I vote for adding this patch as another write cache
because we can say that this patch uses a local disk cache on each
storage node as a Sheepdog disk cache. In addition, we can consider
yet another write cache implementation in future (e.g. use page cache
on storage nodes (not gateway) as a Sheepdog disk cache).
How about the following?
-w object,disk turn on both object cache and disk cache
-w object turn on only object cache
-w disk turn on only disk cache
Thanks,
Kazutaka
More information about the sheepdog
mailing list