aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_domain_save.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-09-07 19:08:11 +0100
committerIan Campbell <ian.campbell@citrix.com>2010-09-07 19:08:11 +0100
commit00a4b65f8534c9e6521eab2e6ce796ae36037774 (patch)
tree6c3494e0dcb6f1e7214becfd7fe88772d0d45e17 /tools/libxc/xc_domain_save.c
parentec7b9a1b9b2a935fa322eca98d95741ff6d162bb (diff)
downloadxen-00a4b65f8534c9e6521eab2e6ce796ae36037774.tar.gz
xen-00a4b65f8534c9e6521eab2e6ce796ae36037774.tar.bz2
xen-00a4b65f8534c9e6521eab2e6ce796ae36037774.zip
libxc: provide notification of final checkpoint to restore end
When the restore code sees this notification it will restore the currently in-progress checkpoint when it completes. This allows the restore end to finish up without waiting for a spurious timeout on the receive fd and thereby avoids unnecessary error logging in the case of a successful migration or restore. In the normal migration or restore case the first checkpoint is always the last. For a rolling checkpoint (such as Remus) the notification is currently unused but could be used in the future for example to provide a controlled failover for reasons other than error Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Brendan Cully <brendan@cs.ubc.ca> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxc/xc_domain_save.c')
-rw-r--r--tools/libxc/xc_domain_save.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c
index ef33fa1134..15c4da3cba 100644
--- a/tools/libxc/xc_domain_save.c
+++ b/tools/libxc/xc_domain_save.c
@@ -1616,6 +1616,20 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
}
}
+ if ( !callbacks->checkpoint )
+ {
+ /*
+ * If this is not a checkpointed save then this must be the first and
+ * last checkpoint.
+ */
+ i = XC_SAVE_ID_LAST_CHECKPOINT;
+ if ( wrexact(io_fd, &i, sizeof(int)) )
+ {
+ PERROR("Error when writing last checkpoint chunk");
+ goto out;
+ }
+ }
+
/* Zero terminate */
i = 0;
if ( wrexact(io_fd, &i, sizeof(int)) )