[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Log an error when enabling shadow mode fails for live relocation.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1190124699 -3600 # Node ID b594583d6e44346d91233bd7b9a6ea0eab648802 # Parent f19c741cb55fb5fc20d0a2129f93bea96670f139 Log an error when enabling shadow mode fails for live relocation. Signed-off-by: Doug Merrill <dpmerrill@xxxxxxxxxx> --- tools/libxc/xc_domain_save.c | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff -r f19c741cb55f -r b594583d6e44 tools/libxc/xc_domain_save.c --- a/tools/libxc/xc_domain_save.c Tue Sep 18 15:09:57 2007 +0100 +++ b/tools/libxc/xc_domain_save.c Tue Sep 18 15:11:39 2007 +0100 @@ -789,7 +789,7 @@ int xc_domain_save(int xc_handle, int io { xc_dominfo_t info; - int rc = 1, i, j, last_iter, iter = 0; + int rc = 1, frc, i, j, last_iter, iter = 0; int live = (flags & XCFLAGS_LIVE); int debug = (flags & XCFLAGS_DEBUG); int race = 0, sent_last_iter, skip_this_iter; @@ -882,13 +882,18 @@ int xc_domain_save(int xc_handle, int io { /* log-dirty already enabled? There's no test op, so attempt to disable then reenable it */ - if ( !(xc_shadow_control(xc_handle, dom, XEN_DOMCTL_SHADOW_OP_OFF, - NULL, 0, NULL, 0, NULL) >= 0 && - xc_shadow_control(xc_handle, dom, - XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY, - NULL, 0, NULL, 0, NULL) >= 0) ) - { - ERROR("Couldn't enable shadow mode"); + frc = xc_shadow_control(xc_handle, dom, XEN_DOMCTL_SHADOW_OP_OFF, + NULL, 0, NULL, 0, NULL); + if ( frc >= 0 ) + { + frc = xc_shadow_control(xc_handle, dom, + XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY, + NULL, 0, NULL, 0, NULL); + } + + if ( frc < 0 ) + { + ERROR("Couldn't enable shadow mode (rc %d) (errno %d)", frc, errno ); goto out; } } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |