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-3.4-testing] libxc: Flush I/O before xc_domain_save

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] libxc: Flush I/O before xc_domain_save completion
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Apr 2010 09:10:15 -0700
Delivery-date: Tue, 13 Apr 2010 09:10:32 -0700
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
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1271092383 -3600
# Node ID a42e9575a59c75184b5f22c3c661f098d67c2861
# Parent  2b26f975c971d8c46878bd9bc169e42cc3d34cc0
libxc: Flush I/O before xc_domain_save completion

The final, flushing call to discard_file_cache also discards any
errors from fsync. Call fsync explicitly before leaving, to check if
all VM memory actually made it to the disk.

Signed-off-by: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
xen-unstable changeset:   21128:b5f9c6274d91
xen-unstable date:        Mon Apr 12 07:22:16 2010 +0100
---
 tools/libxc/xc_domain_save.c |    7 +++++++
 1 files changed, 7 insertions(+)

diff -r 2b26f975c971 -r a42e9575a59c tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c      Mon Apr 12 18:11:39 2010 +0100
+++ b/tools/libxc/xc_domain_save.c      Mon Apr 12 18:13:03 2010 +0100
@@ -1598,6 +1598,13 @@ int xc_domain_save(int xc_handle, int io
         goto out;
     }
 
+    /* Flush last write and check for errors. */
+    if ( fsync(io_fd) && errno != EINVAL )
+    {
+        PERROR("Error when flushing state file");
+        goto out;
+    }
+
     /* Success! */
     rc = 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-3.4-testing] libxc: Flush I/O before xc_domain_save completion, Xen patchbot-3.4-testing <=