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

[Xen-changelog] [xen-unstable] [qemu] Sync data to disk if write cache is disabled.



# HG changeset patch
# User Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
# Date 1178801833 -3600
# Node ID 8226c26cff4028d11f2ef8494712293361805d67
# Parent  305e28c0ef9b5abffd193da88a3bbf5362edf682
[qemu] Sync data to disk if write cache is disabled.

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
---
 tools/ioemu/hw/ide.c |    3 +++
 1 files changed, 3 insertions(+)

diff -r 305e28c0ef9b -r 8226c26cff40 tools/ioemu/hw/ide.c
--- a/tools/ioemu/hw/ide.c      Wed May 09 22:50:26 2007 +0100
+++ b/tools/ioemu/hw/ide.c      Thu May 10 13:57:13 2007 +0100
@@ -968,6 +968,9 @@ static void ide_write_dma_cb(void *opaqu
 
     /* end of transfer ? */
     if (s->nsector == 0) {
+        /* Ensure the data hit disk before telling the guest OS so. */
+        if (!s->write_cache)
+            bdrv_flush(s->bs);
         s->status = READY_STAT | SEEK_STAT;
         ide_set_irq(s);
     eot:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.