From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SB5iu-0007xG-TR for qemu-devel@nongnu.org; Fri, 23 Mar 2012 10:44:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SB5in-000666-JI for qemu-devel@nongnu.org; Fri, 23 Mar 2012 10:44:12 -0400 From: Stefano Stabellini Date: Fri, 23 Mar 2012 14:44:21 +0000 Message-ID: <1332513862-27894-1-git-send-email-stefano.stabellini@eu.citrix.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 1/2] xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, qemu-stable@nongnu.org, Stefano Stabellini 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; } -- 1.7.2.5