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-changelog

[Xen-changelog] [xen-4.1-testing] libxl: do not start a xenpv qemu solel

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.1-testing] libxl: do not start a xenpv qemu solely for tap devices if blktap is available
From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
Date: Wed, 21 Sep 2011 21:11:09 +0100
Delivery-date: Wed, 21 Sep 2011 13:11:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1316621578 -3600
# Node ID 2112db7c68b3423c7ff9ead91eff5de2d13a13b5
# Parent  7d13e08b51209721fde4979ae59cceda6854877a
libxl: do not start a xenpv qemu solely for tap devices if blktap is available

qemu is used as a fallback for DISK_BACKEND_TAP if no blktap is
available but if blktap is available, or for DISK_BACKEND_PHY, we
don't need a qemu process.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
xen-unstable changeset: 23044:d4ca456c0c25
xen-unstable date:      Tue Mar 15 18:19:47 2011 +0000
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 7d13e08b5120 -r 2112db7c68b3 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Sat Sep 17 16:38:31 2011 +0100
+++ b/tools/libxl/libxl_dm.c    Wed Sep 21 17:12:58 2011 +0100
@@ -828,8 +828,29 @@
         goto out;
     }
 
-    if (nr_disks > 0 && !libxl__blktap_enabled(&gc))
-        ret = 1;
+    if (nr_disks > 0) {
+        int blktap_enabled = -1;
+        for (i = 0; i < nr_disks; i++) {
+            switch (disks[i].backend) {
+            case DISK_BACKEND_TAP:
+                if (blktap_enabled == -1)
+                    blktap_enabled = libxl__blktap_enabled(&gc);
+                if (!blktap_enabled) {
+                    ret = 1;
+                    goto out;
+                }
+                break;
+
+            case DISK_BACKEND_QDISK:
+                ret = 1;
+                goto out;
+
+            case DISK_BACKEND_PHY:
+            case DISK_BACKEND_UNKNOWN:
+                break;
+            }
+        }
+    }
 
 out:
     libxl__free_all(&gc);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.1-testing] libxl: do not start a xenpv qemu solely for tap devices if blktap is available, Xen patchbot-4 . 1-testing <=