ioemu: block-vbd: Fix vbd_aio_flush()
PATCH 1/1 ioemu: block-vbd: Fix vbd_aio_flush()
Call the completion function if flush features are not supported in blkfront.
Signed-off-by Yosuke Iwamatsu <[email protected]>
block-vbd.c +2 -1
@@ -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 ; }