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/
Home Products Support Community News


[Xen-changelog] [qemu-xen-unstable] qemu-xen: disable buffering on the s

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-xen: disable buffering on the save file for stubdoms
From: patchbot@xxxxxxx
Date: Fri, 21 Jan 2011 10:05:18 -0800
Delivery-date: Fri, 21 Jan 2011 10:05:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
commit 6a6ffc07f465d5abc94b45ce6fe389369d1395ab
Author: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date:   Fri Jan 21 18:01:53 2011 +0000

    qemu-xen: disable buffering on the save file for stubdoms
    We need to issue reads with the exact number of bytes to read the
    qemu-xen save file, and to do that this patch disables buffering on all
    the savevm reads/writes for stubdoms.
    [This is pretty horrid; hopefully there will be better solution for 4.2 
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
 savevm.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/savevm.c b/savevm.c
index b66f7e2..71a57eb 100644
--- a/savevm.c
+++ b/savevm.c
@@ -133,7 +133,13 @@ void qemu_announce_self(void)
 /* savevm/loadvm support */
+/* disable buffering for stubdoms because we need to issue reads for the
+ * exact number of bytes */
+#define IO_BUF_SIZE 1
 #define IO_BUF_SIZE 32768
 struct QEMUFile {
     QEMUFilePutBufferFunc *put_buffer;
@@ -303,6 +309,10 @@ QEMUFile *qemu_fopen(const char *filename, const char 
     if (!s->outfile)
         goto fail;
+    setvbuf(s->outfile, NULL, _IONBF, 0);
     if (!strcmp(mode, "wb"))
         return qemu_fopen_ops(s, file_put_buffer, NULL, file_close, NULL);
     else if (!strcmp(mode, "rb"))
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-unstable] qemu-xen: disable buffering on the save file for stubdoms, patchbot <=