[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] save/restore: If ENABLE_LOGDIRTY fails, it may be because it is
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1178010986 -3600 # Node ID 1cfe47358f9f7eef158a97c77ca5031da0ce6ea5 # Parent 476efa5c9abf8634ab00cadb6a4bd4b7bbd2000b save/restore: If ENABLE_LOGDIRTY fails, it may be because it is already active. To find out, attempt to disable and then reenable the mode. Signed-off-by: Brendan Cully <brendan@xxxxxxxxx> --- tools/libxc/xc_domain_save.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff -r 476efa5c9abf -r 1cfe47358f9f tools/libxc/xc_domain_save.c --- a/tools/libxc/xc_domain_save.c Tue May 01 10:15:08 2007 +0100 +++ b/tools/libxc/xc_domain_save.c Tue May 01 10:16:26 2007 +0100 @@ -880,8 +880,17 @@ int xc_domain_save(int xc_handle, int io XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY, NULL, 0, NULL, 0, NULL) < 0 ) { - ERROR("Couldn't enable shadow mode"); - goto out; + /* 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"); + goto out; + } } if ( hvm ) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |