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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2 of 9] libxl: fix for libxl not waiting for devices to disconnect
From: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Date: Fri, 14 Oct 2011 15:35:34 +0200
Delivery-date: Fri, 14 Oct 2011 06:48:47 -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=8XhRQhXo85UjpNKHQ8Jqad5D88lp18oM8klXGX6o76Q=; b=pNVgtQ01jPzdh6XFUppBZuzmpcDtc/Rz/S0LeqG3HbnN3GHOP30SPMPG680AEPB8kZ JSf26sn8NqFcCZ9dJ2O8ugvwiX58oX8TEE+PybUeSs1tknYjjDhvZs0o0zUd6bHSLOCC IyUWvtYOYTRUM75C65LK3Qp9xH9pX8XSzwa4g=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1318599332@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.1318599332@loki>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.9.2
# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1317386335 -7200
# Node ID 873e4a1309ce5da0305611ce2e2b460df052019b
# Parent  deb93254ad05ffa13caa64f0159800f04c82666b
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 deb93254ad05 -r 873e4a1309ce tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Fri Sep 30 14:38:55 2011 +0200
+++ b/tools/libxl/libxl_device.c        Fri Sep 30 14:38:55 2011 +0200
@@ -391,6 +391,9 @@ static int wait_for_dev_destroy(libxl__g
             }
             free(l1);
         }
+    } else {
+        /* timeout reached */
+        rc = 0;
     }
     return rc;
 }
@@ -531,7 +534,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