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: t.master-before-merge~14 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=efbb947dba15cc0bf96448c24e3f47e3607002d8;p=qemu-xen-4.0-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 4341259b..129a1f55 100644 --- a/block-vbd.c +++ b/block-vbd.c @@ -261,7 +261,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; }