From: Ian Jackson Date: Thu, 19 Feb 2009 17:40:03 +0000 (+0000) Subject: block-vbd: Fix vbd_aio_flush() no-op case X-Git-Tag: xen-3.3.2-rc1~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=29fdff46ac5207de4a693faea185c15aafd48e1d;p=qemu-xen-3.3-testing.git block-vbd: Fix vbd_aio_flush() no-op case Call the completion function if flush features are not supported in blkfront. Signed-off-by: Yosuke Iwamatsu --- diff --git a/block-vbd.c b/block-vbd.c index 10f7a21f..c1871b0a 100644 --- a/block-vbd.c +++ b/block-vbd.c @@ -273,7 +273,8 @@ static BlockDriverAIOCB *vbd_aio_flush(BlockDriverState *bs, BDRVVbdState *s = bs->opaque; VbdAIOCB *acb = NULL; - if (s->info.mode == O_RDONLY) { + if (s->info.mode == O_RDONLY || + s->info.barrier != 1 || s->info.flush != 1) { cb(opaque, 0); return NULL; }