[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] ioemu: block-vbd: Fix vbd_aio_flush()



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

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>

diff --git a/block-vbd.c b/block-vbd.c
index 4341259..129a1f5 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;
     }


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.