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-devel

[Xen-devel] [PATCH] Fix xm save timeout with paused domains

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix xm save timeout with paused domains
From: john.levon@xxxxxxx
Date: Tue, 08 May 2007 09:05:28 -0700
Delivery-date: Tue, 08 May 2007 09:03:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1178640308 25200
# Node ID eee26efa7fad6ff7ba9ab43dfec82995e9df4653
# Parent  62709adfbeec35215e97f7dbe0ab64c704fca26d
Fix xm save timeout with paused domains.

Don't start migrating a domU before it's unpaused.

Signed-off-by: Max Zhen <max.zhen@xxxxxxx>

diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c
+++ b/tools/libxc/xc_domain_save.c
@@ -454,14 +454,26 @@ static void *map_frame_list_list(int xc_
                                  shared_info_t *shinfo)
 {
     int count = 100;
+    int paused = 1;
+    xc_dominfo_t info;
     void *p;
 
-    while ( count-- && (shinfo->arch.pfn_to_mfn_frame_list_list == 0) )
+    while ( count && (shinfo->arch.pfn_to_mfn_frame_list_list == 0) )
+    {
+        if (paused && xc_domain_getinfo(xc_handle, dom, 1, &info) != 1)
+        {
+            ERROR("Could not get domain info");
+            return NULL;
+        }
+        paused = info.paused;
+        if (!paused)
+            count--; /* start the counter only after dom is unpaused */
         usleep(10000);
+    }
 
     if ( shinfo->arch.pfn_to_mfn_frame_list_list == 0 )
     {
-        ERROR("Timed out waiting for frame list updated.");
+        ERROR("Timed out waiting for frame list update.");
         return NULL;
     }
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel