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
pgpuSpB9I5YTQ.pgp
Description: PGP signature