WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [qemu] Make sure disk writes really made

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [qemu] Make sure disk writes really made it to disk before we report I/O
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 04 Aug 2006 11:00:18 +0000
Delivery-date: Fri, 04 Aug 2006 04:03:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User chris@xxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 3ea0a6847198d0c448cb19f2e95bee9e0b48ae59
# Parent  cf00bca7c6e1e4d334f3a67ba7bcb5dfeb6e9af4
[qemu] Make sure disk writes really made it to disk before we report I/O
completion to the guest domain.  The DMA_MULTI_THREAD functionality
from the qemu-dm IDE emulation should make the performance overhead
of synchronous writes bearable, or at least comparable to native
hardware.

Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>
---
 tools/ioemu/block-bochs.c |    2 +-
 tools/ioemu/block-cloop.c |    2 +-
 tools/ioemu/block-cow.c   |    2 +-
 tools/ioemu/block-qcow.c  |    2 +-
 tools/ioemu/block-vmdk.c  |    2 +-
 tools/ioemu/block.c       |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff -r cf00bca7c6e1 -r 3ea0a6847198 tools/ioemu/block-bochs.c
--- a/tools/ioemu/block-bochs.c Fri Aug 04 10:20:33 2006 +0100
+++ b/tools/ioemu/block-bochs.c Fri Aug 04 10:28:51 2006 +0100
@@ -91,7 +91,7 @@ static int bochs_open(BlockDriverState *
     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)
diff -r cf00bca7c6e1 -r 3ea0a6847198 tools/ioemu/block-cloop.c
--- a/tools/ioemu/block-cloop.c Fri Aug 04 10:20:33 2006 +0100
+++ b/tools/ioemu/block-cloop.c Fri Aug 04 10:28:51 2006 +0100
@@ -55,7 +55,7 @@ static int cloop_open(BlockDriverState *
     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;
diff -r cf00bca7c6e1 -r 3ea0a6847198 tools/ioemu/block-cow.c
--- a/tools/ioemu/block-cow.c   Fri Aug 04 10:20:33 2006 +0100
+++ b/tools/ioemu/block-cow.c   Fri Aug 04 10:28:51 2006 +0100
@@ -69,7 +69,7 @@ static int cow_open(BlockDriverState *bs
     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)
diff -r cf00bca7c6e1 -r 3ea0a6847198 tools/ioemu/block-qcow.c
--- a/tools/ioemu/block-qcow.c  Fri Aug 04 10:20:33 2006 +0100
+++ b/tools/ioemu/block-qcow.c  Fri Aug 04 10:28:51 2006 +0100
@@ -95,7 +95,7 @@ static int qcow_open(BlockDriverState *b
     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)
diff -r cf00bca7c6e1 -r 3ea0a6847198 tools/ioemu/block-vmdk.c
--- a/tools/ioemu/block-vmdk.c  Fri Aug 04 10:20:33 2006 +0100
+++ b/tools/ioemu/block-vmdk.c  Fri Aug 04 10:28:51 2006 +0100
@@ -96,7 +96,7 @@ static int vmdk_open(BlockDriverState *b
     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)
diff -r cf00bca7c6e1 -r 3ea0a6847198 tools/ioemu/block.c
--- a/tools/ioemu/block.c       Fri Aug 04 10:20:33 2006 +0100
+++ b/tools/ioemu/block.c       Fri Aug 04 10:28:51 2006 +0100
@@ -677,7 +677,7 @@ static int raw_open(BlockDriverState *bs
     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)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [qemu] Make sure disk writes really made it to disk before we report I/O, Xen patchbot-unstable <=