[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes.
--On 8 March 2013 12:54:16 +0000 George Dunlap <George.Dunlap@xxxxxxxxxxxxx> wrote: On Fri, Mar 8, 2013 at 11:40 AM, Alex Bligh <alex@xxxxxxxxxxx> wrote: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.Not qualified to comment on the technical merits of the patch, but re the commit message: Acked-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> Any further thoughts on this one? -- Alex Bligh ---------- Forwarded Message ---------- Date: 8 March 2013 11:40:44 +0000 From: Alex Bligh <alex@xxxxxxxxxxx>To: xen-devel <xen-devel@xxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Alex Bligh <alex@xxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx> Subject: [PATCHv3] QEMU(upstream): Disable xen's 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> --- 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 a402ac8..14f8723 100644 --- a/hw/xen_disk.c +++ b/hw/xen_disk.c @@ -603,7 +603,7 @@ static int blk_init(struct XenDevice *xendev) } /* read-only ? */ - qflags = BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO; + qflags = BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO; if (strcmp(blkdev->mode, "w") == 0) { qflags |= BDRV_O_RDWR; } else { -- 1.7.4.1 ---------- End Forwarded Message ---------- -- Alex Bligh _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |