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

Re: [Xen-devel] [PATCH] Make XEN_DOMCTL_destroydomain hypercall return e

On Thu, Aug 09, 2007 at 07:09:42PM +0900, Isaku Yamahata wrote:
> But it would be appropriate to insert the logic to xc_domain_destroy()
> of libxc.

Sorry, I sent it out too early.
attached the tested patch.

# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1186659366 -32400
# Node ID 2558fdeb290718c3f361f6913fc41c9a86da872b
# Parent  f18667f3d03d79c75ae0fb1a313a10357510aca1
retry destroy domain hypercall until success.
PATCHNAME: retry_destroy_domain_hypercall_until_success

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r f18667f3d03d -r 2558fdeb2907 tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Thu Aug 09 17:25:50 2007 +0900
+++ b/tools/libxc/xc_domain.c   Thu Aug 09 20:36:06 2007 +0900
@@ -55,10 +55,17 @@ int xc_domain_destroy(int xc_handle,
 int xc_domain_destroy(int xc_handle,
                       uint32_t domid)
 {
+    int ret;
     DECLARE_DOMCTL;
     domctl.cmd = XEN_DOMCTL_destroydomain;
     domctl.domain = (domid_t)domid;
-    return do_domctl(xc_handle, &domctl);
+    for (;;) {
+        ret = do_domctl(xc_handle, &domctl);
+        if (ret && errno == -EAGAIN)
+            continue;
+        break;
+    }
+    return ret;
 }
 
 int xc_domain_shutdown(int xc_handle,

-- 
yamahata

Attachment: 15712_2558fdeb2907_retry_destroy_domain_hypercall_until_success.patch
Description: Text Data

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