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

[Xen-changelog] [qemu-xen-unstable] xen: Disable use of O_DIRECT by default as it results in crashes.



commit b86eb6bb95e67d22185967657c97fb6a2f131198
Author:     Alex Bligh <alex@xxxxxxxxxxx>
AuthorDate: Fri Mar 15 18:25:15 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Fri Mar 15 18:26:46 2013 +0000

    xen: Disable use of O_DIRECT by default as it results in crashes.
    
    Due to what is almost certainly a kernel bug, writes with O_DIRECT may
    continue to reference the page after the write has been marked as
    completed, particularly in the case of TCP retransmit. In other
    scenarios, this "merely" risks data corruption on the write, but with
    Xen pages from domU are only transiently mapped into dom0's memory,
    resulting in kernel panics when they are subsequently accessed.
    
    This brings PV devices in line with emulated devices.  Removing
    O_DIRECT is safe as barrier operations are now correctly passed
    through.
    
    See:
      http://lists.xen.org/archives/html/xen-devel/2012-12/msg01154.html
    for more details.
    
    Signed-off-by: Alex Bligh <alex@xxxxxxxxxxx>
    Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
    
    Backported to qemu-xen-unstable,
    Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 hw/xen_disk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 33a5531..ee8d36f 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -635,7 +635,7 @@ static int blk_init(struct XenDevice *xendev)
        return -1;
 
     /* read-only ? */
-    qflags = BDRV_O_NOCACHE;
+    qflags = BDRV_O_CACHE_WB;
     if (strcmp(blkdev->mode, "w") == 0) {
        mode   = O_RDWR;
        qflags |= BDRV_O_RDWR;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.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®.