WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] ioemu: block-vbd: Fix vbd_aio_flush()
From: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
Date: Thu, 19 Feb 2009 19:44:46 +0900
Delivery-date: Thu, 19 Feb 2009 02:45:49 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] ioemu: block-vbd: Fix vbd_aio_flush(), Yosuke Iwamatsu <=