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 4 of 6] libxl: fix for libxl not waiting for devices

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 4 of 6] libxl: fix for libxl not waiting for devices to disconnect
From: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Date: Thu, 22 Sep 2011 14:01:11 +0200
Delivery-date: Thu, 22 Sep 2011 05:11:25 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:content-type:mime-version:content-transfer-encoding:subject :x-mercurial-node:message-id:in-reply-to:references:user-agent:date :from:to; bh=W8nLcmjvjzMMU9XJjG2V7OqqfcgHWwzGLvBKzhqyCYE=; b=PwxwDUkzEjT0tN0pKQQea/PKuCbhwewa6ujP8glSMaHxI9kvXV6Mpf621qVAwrcVVq Zm8tF7N7j+VFht9VQgx0D71QqxXgoCsEtP0e/CtYUWrCDoMLCQbXZyCXxtYofmI0B7xM A00OBVcq8pGSdBAXb62jDPzs9SVQLGQ4pzXmI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1316692867@loki>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1316692867@loki>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.8.4
# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1316692495 -7200
# Node ID d5cca9e3b5d3576073a543d0305e8f0d9dc9beeb
# Parent  2d77cbdc816bc943e9e69ecca34ae7157079045a
libxl: fix for libxl not waiting for devices to disconnect

libxl was ignoring the timeout and the number of devices to wait before 
destroying them.

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>

diff -r 2d77cbdc816b -r d5cca9e3b5d3 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Thu Sep 22 13:54:49 2011 +0200
+++ b/tools/libxl/libxl_device.c        Thu Sep 22 13:54:55 2011 +0200
@@ -422,6 +422,9 @@ static int wait_for_dev_destroy(libxl__g
             }
             free(l1);
         }
+    } else {
+        /* timeout reached */
+        rc = 0;
     }
     return rc;
 }
@@ -482,7 +485,7 @@ int libxl__devices_destroy(libxl__gc *gc
         tv.tv_usec = 0;
         while (n_watches > 0) {
             if (wait_for_dev_destroy(gc, &tv)) {
-                break;
+                continue;
             } else {
                 n_watches--;
             }

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

<Prev in Thread] Current Thread [Next in Thread>