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

[Xen-changelog] [xen-unstable] [qemu patches] Update patches for changeset 11209:9bb6c1c1890a.



# HG changeset patch
# User Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
# Node ID a61b92fc2966c4b95b66042e243daacb61da124f
# Parent  9bb6c1c1890a07885265bbc59f4dbb660312974e
[qemu patches] Update patches for changeset 11209:9bb6c1c1890a.

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
---
 tools/ioemu/patches/qemu-fix-write-to-disk-synchronous |   66 -----------------
 tools/ioemu/patches/qemu-tunable-ide-write-cache       |   39 ++++++++++
 tools/ioemu/patches/series                             |    2 
 3 files changed, 40 insertions(+), 67 deletions(-)

diff -r 9bb6c1c1890a -r a61b92fc2966 tools/ioemu/patches/series
--- a/tools/ioemu/patches/series        Sun Aug 20 23:59:34 2006 +0100
+++ b/tools/ioemu/patches/series        Mon Aug 21 00:01:11 2006 +0100
@@ -39,8 +39,8 @@ xenstore-write-vnc-port
 xenstore-write-vnc-port
 qemu-allow-disable-sdl
 qemu-fix-memset-args
-qemu-fix-write-to-disk-synchronous
 xen-support-buffered-ioreqs
 qemu-daemonize
 xen-platform-device
 qemu-bootorder
+qemu-tunable-ide-write-cache
diff -r 9bb6c1c1890a -r a61b92fc2966 
tools/ioemu/patches/qemu-tunable-ide-write-cache
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/ioemu/patches/qemu-tunable-ide-write-cache  Mon Aug 21 00:01:11 
2006 +0100
@@ -0,0 +1,57 @@
+Index: ioemu/hw/ide.c
+===================================================================
+--- ioemu.orig/hw/ide.c        2006-08-20 22:22:36.000000000 +0100
++++ ioemu/hw/ide.c     2006-08-20 23:56:13.000000000 +0100
+@@ -305,6 +305,7 @@
+     PCIDevice *pci_dev;
+     struct BMDMAState *bmdma;
+     int drive_serial;
++    int write_cache;
+     /* ide regs */
+     uint8_t feature;
+     uint8_t error;
+@@ -789,6 +790,9 @@
+     }
+     ide_set_sector(s, sector_num + n);
+     
++    if (!s->write_cache)
++        bdrv_flush(s->bs);
++    
+ #ifdef TARGET_I386
+     if (win2k_install_hack && ((++s->irq_count % 16) == 0)) {
+         /* It seems there is a bug in the Windows 2000 installer HDD
+@@ -863,6 +867,10 @@
+         transfer_size -= len;
+         phys_addr += len;
+     }
++    /* Ensure the data hit disk before telling the guest OS so. */
++    if (!s->write_cache)
++        bdrv_flush(s->bs);
++
+     return transfer_size1 - transfer_size;
+ }
+ 
+@@ -1672,7 +1680,15 @@
+             /* XXX: valid for CDROM ? */
+             switch(s->feature) {
+             case 0x02: /* write cache enable */
++                s->write_cache = 1;
++                s->status = READY_STAT | SEEK_STAT;
++                ide_set_irq(s);
++                break;
+             case 0x82: /* write cache disable */
++                s->write_cache = 0;
++                s->status = READY_STAT | SEEK_STAT;
++                ide_set_irq(s);
++                break;
+             case 0xaa: /* read look-ahead enable */
+             case 0x55: /* read look-ahead disable */
+                 s->status = READY_STAT | SEEK_STAT;
+@@ -2090,6 +2106,7 @@
+         s->irq = irq;
+         s->sector_write_timer = qemu_new_timer(vm_clock, 
+                                                ide_sector_write_timer_cb, s);
++        s->write_cache = 0;
+         ide_reset(s);
+     }
+ }
diff -r 9bb6c1c1890a -r a61b92fc2966 
tools/ioemu/patches/qemu-fix-write-to-disk-synchronous
--- a/tools/ioemu/patches/qemu-fix-write-to-disk-synchronous    Sun Aug 20 
23:59:34 2006 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-Index: ioemu/block-vmdk.c
-===================================================================
---- ioemu.orig/block-vmdk.c    2006-08-17 19:37:35.737593169 +0100
-+++ ioemu/block-vmdk.c 2006-08-17 19:50:28.884943317 +0100
-@@ -96,7 +96,7 @@
-     uint32_t magic;
-     int l1_size;
- 
--    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
-+    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE | O_SYNC);
-     if (fd < 0) {
-         fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
-         if (fd < 0)
-Index: ioemu/block-qcow.c
-===================================================================
---- ioemu.orig/block-qcow.c    2006-08-17 19:37:35.737593169 +0100
-+++ ioemu/block-qcow.c 2006-08-17 19:50:28.885943206 +0100
-@@ -95,7 +95,7 @@
-     int fd, len, i, shift;
-     QCowHeader header;
-     
--    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
-+    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE | O_SYNC);
-     if (fd < 0) {
-         fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
-         if (fd < 0)
-Index: ioemu/block-bochs.c
-===================================================================
---- ioemu.orig/block-bochs.c   2006-08-17 19:37:35.737593169 +0100
-+++ ioemu/block-bochs.c        2006-08-17 19:50:28.885943206 +0100
-@@ -91,7 +91,7 @@
-     int fd, i;
-     struct bochs_header bochs;
- 
--    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
-+    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE | O_SYNC);
-     if (fd < 0) {
-         fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
-         if (fd < 0)
-Index: ioemu/block.c
-===================================================================
---- ioemu.orig/block.c 2006-08-17 19:50:18.872050063 +0100
-+++ ioemu/block.c      2006-08-17 19:50:28.885943206 +0100
-@@ -685,7 +685,7 @@
-     int rv;
- #endif
- 
--    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
-+    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE | O_SYNC);
-     if (fd < 0) {
-         fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
-         if (fd < 0)
-Index: ioemu/block-cow.c
-===================================================================
---- ioemu.orig/block-cow.c     2006-08-17 19:37:35.738593058 +0100
-+++ ioemu/block-cow.c  2006-08-17 19:50:28.886943095 +0100
-@@ -69,7 +69,7 @@
-     struct cow_header_v2 cow_header;
-     int64_t size;
- 
--    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
-+    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE | O_SYNC);
-     if (fd < 0) {
-         fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
-         if (fd < 0)
-Index: ioemu/block-cloop.c
-===================================================================
---- ioemu.orig/block-cloop.c   2006-08-17 19:37:35.737593169 +0100
-+++ ioemu/block-cloop.c        2006-08-17 19:50:28.886943095 +0100
-@@ -55,7 +55,7 @@
-     BDRVCloopState *s = bs->opaque;
-     uint32_t offsets_size,max_compressed_block_size=1,i;
- 
--    s->fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
-+    s->fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE | O_SYNC);
-     if (s->fd < 0)
-         return -1;
-     bs->read_only = 1;

_______________________________________________
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®.