From patchwork Tue Mar 27 15:50:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 148981 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C1D99B6EEC for ; Wed, 28 Mar 2012 02:49:25 +1100 (EST) Received: from localhost ([::1]:48138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCYeB-0006XU-Hs for incoming@patchwork.ozlabs.org; Tue, 27 Mar 2012 11:49:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCYdw-0006Ss-Pe for qemu-devel@nongnu.org; Tue, 27 Mar 2012 11:49:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCYdr-0005TI-NC for qemu-devel@nongnu.org; Tue, 27 Mar 2012 11:49:08 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:53819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCYdr-0005Sd-I8; Tue, 27 Mar 2012 11:49:03 -0400 X-IronPort-AV: E=Sophos;i="4.75,327,1330923600"; d="scan'208";a="187771984" Received: from ftlpmailmx01.citrite.net ([10.13.107.65]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/RC4-MD5; 27 Mar 2012 11:48:59 -0400 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.65) with Microsoft SMTP Server id 8.3.213.0; Tue, 27 Mar 2012 11:48:58 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1SCYdh-0000pf-5s; Tue, 27 Mar 2012 16:48:53 +0100 From: Stefano Stabellini To: anthony@codemonkey.ws Date: Tue, 27 Mar 2012 16:50:05 +0100 Message-ID: <1332863406-358-1-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.63 Cc: aliguori@us.ibm.com, Stefano Stabellini , qemu-stable@nongnu.org, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 1/2] xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Stefano Stabellini --- hw/xen_disk.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xen_disk.c b/hw/xen_disk.c index 68fa36a..0f265a4 100644 --- a/hw/xen_disk.c +++ b/hw/xen_disk.c @@ -584,10 +584,10 @@ static int blk_init(struct XenDevice *xendev) } /* read-only ? */ + qflags = BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO; if (strcmp(blkdev->mode, "w") == 0) { - qflags = BDRV_O_RDWR; + qflags |= BDRV_O_RDWR; } else { - qflags = 0; info |= VDISK_READONLY; }