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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 3 of 9] libxl: fix for libxl not waiting for devices to disconnect
From: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Date: Fri, 30 Sep 2011 14:43:03 +0200
Delivery-date: Fri, 30 Sep 2011 05:48: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=NbqP8D+OMLOPi4qNjmczoaFx8HdhYL3mZc5WFUR3ahs=; b=sipDZfHoJ8unBW/YFPssO2DCwpUDw4RtzJdt5UOlxA87KNFwcfJGaGJfohxAo30ZlQ umAPL1HmSjLOIRoaagU1Yk0jU1g8yscYrXT/oWZmI5H7rFckjD8iZbd4IbiubVXVbFFX 2ofWGRhgL11X0o3rU6+yz2VaBzOfKEcjjPh68=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1317386580@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.1317386580@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 31b3caad18ac904a242c5bd1ea2bb0e574cd0453
# Parent  d10abc15d963b00658405be71981f5726e24c0aa
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 d10abc15d963 -r 31b3caad18ac 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
@@ -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