qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 3/3] dataplane: submit I/O as a batch


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v4 3/3] dataplane: submit I/O as a batch
Date: Thu, 3 Jul 2014 14:35:17 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Jul 02, 2014 at 08:18:48PM +0800, Ming Lei wrote:
> diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
> index c10b7b7..82bb276 100644
> --- a/hw/block/dataplane/virtio-blk.c
> +++ b/hw/block/dataplane/virtio-blk.c
> @@ -201,6 +201,9 @@ static void do_flush_cmd(VirtIOBlockDataPlane *s, 
> VirtQueueElement *elem,
>      req->elem = elem;
>      req->inhdr = inhdr;
>  
> +    /* flush IOs queued first */
> +    bdrv_flush_io_queue(s->blk->conf.bs);
> +
>      bdrv_aio_flush(s->blk->conf.bs, complete_flush, req);
>  }
>  

I looked back at previous email threads but I don't understand why this
is necessary.

bdrv_aio_flush() commits the disk write cache, that means _already
completed_ writes will be on stable storage.  However, it does not make
any guarantees about in-flight writes.  So this seems like a pointless
call that can be dropped safely.

Stefan

Attachment: pgpInQtApB1ao.pgp
Description: PGP signature


reply via email to

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