From: Ian Campbell Subject: Re: [Xen-devel] [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER Date: Wed, 25 Apr 2012 12:17:35 +0100 Message-ID: <1335352655.28015.35.camel@zakaz.uk.xensource.com> References: <1334595957-12552-1-git-send-email-stefano.stabellini@eu.citrix.com> <20120425084524.GA17537@lst.de> <1335344565.28015.7.camel@zakaz.uk.xensource.com> <20120425102024.GA19800@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Stefano Stabellini Cc: "kwolf@redhat.com" , "xen-devel@lists.xensource.com" , Christoph Hellwig , "konrad.wilk@oracle.com" , "qemu-devel@nongnu.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2012-04-25 at 12:21 +0100, Stefano Stabellini wrote: > On Wed, 25 Apr 2012, Christoph Hellwig wrote: > > On Wed, Apr 25, 2012 at 10:02:45AM +0100, Ian Campbell wrote: > > > The blkif spec was recently much improved, you can find it at > > > http://xenbits.xen.org/docs/unstable/hypercall/include,public,io,blkif.h.html > > > > > > TBH I'm not sure it actually answers your questions wrt > > > BLKIF_OP_FLUSH_DISKCACHE, if not please let us know and we can see about > > > improving it. > > > > That description in there is overly simple, and does not match any of the > > implementations known to me on either end. > > That is true, in fact I couldn't figure out what I had to implement just > reading the comment. So I went through the blkback code and tried to > understand what I had to do, but I got it wrong. > > Reading the code again it seems to me that BLKIF_OP_FLUSH_DISKCACHE > is supposed to have the same semantics as REQ_FLUSH, that implies a > preflush if nr_segments > 0, not a postflush like I did. > > Konrad, can you please confirm this? ... and then provide a patch to blkif.h. Thanks, Ian.