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 02 of 10] libxl: Do not start stubdom when not needed

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 02 of 10] libxl: Do not start stubdom when not needed
From: Marek Marczykowski <marmarek@xxxxxxxxxxxx>
Date: Fri, 03 Jun 2011 00:35:32 +0200
Cc: marmarek@xxxxxxxxxxxx
Delivery-date: Thu, 02 Jun 2011 15:37:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1307054130@devel14>
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.1307054130@devel14>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.8.2
# HG changeset patch
# User Marek Marczykowski <marmarek@xxxxxxxxxxxx>
# Date 1306962900 -7200
# Node ID 59cff6b471f3f0c1e91349ed6653a47a40d4fd55
# Parent  e3a3f5cc95349e92b7cb8b1448e999ffc16bd060
libxl: Do not start stubdom when not needed

Do not start stubdom when there is any disk - only when there are disks
requiring it.

Signed-off-by: Marek Marczykowski <marmarek@xxxxxxxxxxxx>

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -828,8 +828,14 @@
         goto out;
     }
 
-    if (nr_disks > 0 && !libxl__blktap_enabled(&gc))
-        ret = 1;
+    if (nr_disks > 0 && !libxl__blktap_enabled(&gc)) {
+        for (i = 0; i < nr_disks; i++) {
+            if (disks[i].backend == DISK_BACKEND_TAP || disks[i].backend == 
DISK_BACKEND_QDISK) {
+                ret = 1;
+                goto out;
+            }
+        }
+    }
 
 out:
     libxl__free_all(&gc);



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