Skip to contentSkip to conversation

ioemu: block-vbd: Fix vbd_aio_flush()

PATCH New Yosuke Iwamatsu 1 participant 1 message Feb 19, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ioemu: block-vbd: Fix vbd_aio_flush()

Call the completion function if flush features are not supported in blkfront.

block-vbd.c +2 -1
index 4341259..129a1f5 100644
@@ -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;
     }