[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxc: Flush I/O before xc_domain_save completion
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1271053336 -3600 # Node ID b5f9c6274d917db5bbe6cb9cc0d59910cc07a8a6 # Parent 5bc70100b514d98bd3938cdeca1e182726c26df2 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> --- tools/libxc/xc_domain_save.c | 7 +++++++ 1 files changed, 7 insertions(+) diff -r 5bc70100b514 -r b5f9c6274d91 tools/libxc/xc_domain_save.c --- a/tools/libxc/xc_domain_save.c Mon Apr 12 07:21:44 2010 +0100 +++ b/tools/libxc/xc_domain_save.c Mon Apr 12 07:22:16 2010 +0100 @@ -1764,6 +1764,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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |