WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Log an error when enabling shadow mode fa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Log an error when enabling shadow mode fails for live relocation.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Sep 2007 03:40:35 -0700
Delivery-date: Wed, 26 Sep 2007 03:41:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Log an error when enabling shadow mode fails for live relocation., Xen patchbot-unstable <=