[Sheepdog] [PATCH] object cache: add flush_and_delete operation

MORITA Kazutaka morita.kazutaka at gmail.com
Thu Apr 5 16:49:58 CEST 2012


At Wed, 04 Apr 2012 17:49:29 +0800,
Liu Yuan wrote:
> 
> On 04/04/2012 01:19 AM, MORITA Kazutaka wrote:
> 
> > Hmm, does this work well when multiple write requests arrive at the
> > same time?  I cannot come up with a better approach, though.
> 
> Hi Kazum,
> 
>    I give a second try, finding that Guest(RHEL 6) will wait after issue
> a write request till its completion at very eary bootup before 'login'.
> I didn't see concurrent IO from the log at that stage, so I recommend
> not do over-design without a practical real case that cause inconsistency.

We can use VDIs other than root disks.

> 
>   Here is the V2 path
>   -V2
>     correct object_cache_lookup() usage
> 
> From a167146c55f0354a6f44fa7b28cd9a3a4e4ee089 Mon Sep 17 00:00:00 2001
> From: Liu Yuan <tailai.ly at taobao.com>
> Date: Wed, 4 Apr 2012 17:11:45 +0800
> Subject: [PATCH v2] object cache: add flush_and_delete operation
> 
> If 1) VDI is opened without cache enabled and 2) we unfortunately have
> a cache for it previously, we should flush the cache then delete it.
> 
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
>  sheep/object_cache.c |   42 ++++++++++++++++++++++++++++++++++++++++++
>  sheep/sheep_priv.h   |    1 +
>  sheep/store.c        |   30 +++++++++++++++++++++---------
>  3 files changed, 64 insertions(+), 9 deletions(-)

Applied, thanks.

But let's fix the concurrent write problem in future patch.

Kazutaka



More information about the sheepdog mailing list