Bastian Blank
2011-Apr-30 13:39 UTC
[Pkg-xen-changes] r895 - in trunk/xen/debian: . patches
Author: waldi Date: Sat Apr 30 13:39:55 2011 New Revision: 895 Log: Don''t use qemu-dm if it is not needed. * debian/changelog: Update. * debian/patches/series: Add new patch. * debian/patches/upstream-23044:d4ca456c0c25: Add backport. Added: trunk/xen/debian/patches/upstream-23044:d4ca456c0c25 Modified: trunk/xen/debian/changelog trunk/xen/debian/patches/series Modified: trunk/xen/debian/changelog =============================================================================--- trunk/xen/debian/changelog Thu Apr 28 13:21:11 2011 (r894) +++ trunk/xen/debian/changelog Sat Apr 30 13:39:55 2011 (r895) @@ -1,3 +1,9 @@ +xen (4.1.0-4) UNRELEASED; urgency=low + + * Don''t use qemu-dm if it is not needed. (Backport from xen-unstable.) + + -- Bastian Blank <waldi at debian.org> Sat, 30 Apr 2011 15:30:35 +0200 + xen (4.1.0-3) unstable; urgency=low * Add ghostscript to build-deps. Modified: trunk/xen/debian/patches/series =============================================================================--- trunk/xen/debian/patches/series Thu Apr 28 13:21:11 2011 (r894) +++ trunk/xen/debian/patches/series Sat Apr 30 13:39:55 2011 (r895) @@ -52,3 +52,4 @@ tools-python-shebang.diff tools-xenstore-compatibility.diff +upstream-23044:d4ca456c0c25 Added: trunk/xen/debian/patches/upstream-23044:d4ca456c0c25 =============================================================================--- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/xen/debian/patches/upstream-23044:d4ca456c0c25 Sat Apr 30 13:39:55 2011 (r895) @@ -0,0 +1,50 @@ +# HG changeset patch +# User Ian Campbell <ian.campbell at citrix.com> +# Date 1300213187 0 +# Node ID d4ca456c0c25c3c3daedc216c657296f2895482a +# Parent 3caed2112c65791855e8bf0fd34c15e3160bbc78 +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 at citrix.com> +Acked-by: Ian Jackson <ian.jackson at eu.citrix.com> +Committed-by: Ian Jackson <ian.jackson at eu.citrix.com> + +diff -r 3caed2112c65 -r d4ca456c0c25 tools/libxl/libxl_dm.c +--- a/tools/libxl/libxl_dm.c Tue Mar 15 10:14:27 2011 +0000 ++++ b/tools/libxl/libxl_dm.c Tue Mar 15 18:19:47 2011 +0000 +@@ -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);