qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] sheepdog: implement SD_OP_FLUSH_VDI operation


From: MORITA Kazutaka
Subject: Re: [Qemu-devel] [PATCH] sheepdog: implement SD_OP_FLUSH_VDI operation
Date: Tue, 24 Apr 2012 01:26:43 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/22.3 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Mon, 23 Apr 2012 08:08:46 +0200,
Christoph Hellwig wrote:
> 
> On Fri, Apr 20, 2012 at 12:15:36PM -0700, MORITA Kazutaka wrote:
> > His patch sets the SD_FLAG_CMD_CACHE flag for writes only when the
> > user selects cache=writeback or cache=none.  If SD_FLAG_CMD_CACHE is
> > not set in the request, Sheepdog servers are forced to flush the cache
> > like FUA commands.
> 
> Ok, I missed that part and it thus seems ok.  What still sems missing
> is error handling in case the sheepdog cluster doesn't actually support
> the new flag.  What happens if cache=none is specified with a cluster
> not actually supporting it?  Remember that cache=none is the default for
> many management frontends to qemu.

SD_FLAG_CMD_CACHE is ignored in the older version of Sheepdog, so,
even if we specify cache=writeback or cache=none, the data is written
with O_DSYNC always and cannot be cached in the server's page cache or
volatile disk cache either.  I think it is safe.

It seems that there is another version problem with this patch;
bdrv_co_flush_to_disk() results in error with the older Sheepdog which
doesn't support SD_OP_FLUSH_VDI.  The simple fix is to increment
SD_PROTO_VER and prevent the newer qemu from connecting to the older
Sheepdog cluster, I think.

Thanks,

Kazutaka



reply via email to

[Prev in Thread] Current Thread [Next in Thread]