[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-xen-4.1-testing] qemu-xen-traditional: use O_DIRECT to open disk images with QDISK



commit a899c4c19ccf757248b0f0bb7057c7d00d28bab1
Author: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date:   Mon Apr 2 17:54:36 2012 +0100

    qemu-xen-traditional: use O_DIRECT to open disk images with QDISK
    
    Also enable batch_maps, use_aio and disable syncwrite.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    (cherry picked from commit 0efae2f1fe8f72628c58b3683f62725a613fcec3)
---
 hw/xen_disk.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 6aebb77..b1d6985 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -46,11 +46,11 @@
 
 /* ------------------------------------------------------------- */
 
-static int syncwrite    = 1;
-static int batch_maps   = 0;
+static int syncwrite    = 0;
+static int batch_maps   = 1;
 
 static int max_requests = 32;
-static int use_aio      = 0;
+static int use_aio      = 1;
 
 /* ------------------------------------------------------------- */
 
@@ -617,12 +617,13 @@ static int blk_init(struct XenDevice *xendev)
        return -1;
 
     /* read-only ? */
+    qflags = BDRV_O_NOCACHE;
     if (strcmp(blkdev->mode, "w") == 0) {
        mode   = O_RDWR;
-       qflags = BDRV_O_RDWR;
+       qflags |= BDRV_O_RDWR;
     } else {
        mode   = O_RDONLY;
-       qflags = BDRV_O_RDONLY;
+       qflags |= BDRV_O_RDONLY;
        info  |= VDISK_READONLY;
     }
 
--
generated by git-patchbot for /home/xen/git/qemu-xen-4.1-testing.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.