Patchwork [1/2] xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO

login
register
mail settings
Submitter Stefano Stabellini
Date March 27, 2012, 3:50 p.m.
Message ID <1332863406-358-1-git-send-email-stefano.stabellini@eu.citrix.com>
Download mbox | patch
Permalink /patch/148981/
State New
Headers show

Comments

Stefano Stabellini - March 27, 2012, 3:50 p.m.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 hw/xen_disk.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

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;
     }