From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yosuke Iwamatsu Subject: [PATCH] ioemu: block-vbd: Fix vbd_aio_flush() Date: Thu, 19 Feb 2009 19:44:46 +0900 Message-ID: <499D381E.7060604@ab.jp.nec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 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; }