[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] xc_domain_save: Do not poll-wait for guest to shutdown.



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1222310873 -32400
# Node ID 6055360dbfe4848682ee8c65bce19c57e1728034
# Parent  3d96f88fb220dd1b29f4873deca378913b3db3ff
[IA64] xc_domain_save: Do not poll-wait for guest to shutdown.

This patch is ia64 counter part of 18452:59904b180078.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 tools/libxc/ia64/xc_ia64_linux_save.c |   31 +++----------------------------
 1 files changed, 3 insertions(+), 28 deletions(-)

diff -r 3d96f88fb220 -r 6055360dbfe4 tools/libxc/ia64/xc_ia64_linux_save.c
--- a/tools/libxc/ia64/xc_ia64_linux_save.c     Thu Sep 18 17:54:15 2008 +0900
+++ b/tools/libxc/ia64/xc_ia64_linux_save.c     Thu Sep 25 11:47:53 2008 +0900
@@ -56,43 +56,18 @@ suspend_and_state(int (*suspend)(void), 
 suspend_and_state(int (*suspend)(void), int xc_handle, int io_fd,
                   int dom, xc_dominfo_t *info)
 {
-    int i = 0;
-
     if (!(*suspend)()) {
         ERROR("Suspend request failed");
         return -1;
     }
 
-retry:
-
-    if (xc_domain_getinfo(xc_handle, dom, 1, info) != 1) {
+    if ( (xc_domain_getinfo(xc_handle, dom, 1, info) != 1) ||
+         !info->shutdown || (info->shutdown_reason != SHUTDOWN_suspend) ) {
         ERROR("Could not get domain info");
         return -1;
     }
 
-    if (info->shutdown && info->shutdown_reason == SHUTDOWN_suspend)
-        return 0; // success
-
-    if (info->paused) {
-        // try unpausing domain, wait, and retest
-        xc_domain_unpause(xc_handle, dom);
-
-        ERROR("Domain was paused. Wait and re-test.");
-        usleep(10000);  // 10ms
-
-        goto retry;
-    }
-
-
-    if(++i < 100) {
-        ERROR("Retry suspend domain.");
-        usleep(10000);  // 10ms
-        goto retry;
-    }
-
-    ERROR("Unable to suspend domain.");
-
-    return -1;
+    return 0;
 }
 
 static inline int

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.