|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-3.4-testing] libxc: Flush I/O before xc_domain_save
# 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 <=
|
|
|
|
|