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-unstable] tools/libxl: use qdisk if blktap2 is not

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools/libxl: use qdisk if blktap2 is not available
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Nov 2010 10:25:13 -0800
Delivery-date: Wed, 24 Nov 2010 10:25:48 -0800
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 Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1290540202 0
# Node ID 9ffd785319e09bc9a655d320f77d655ebec42514
# Parent  91143941c4926bd8e2c709b0924ed69dabf4437d
tools/libxl: use qdisk if blktap2 is not available

Whenever blktap2 is not available use qdisk as block backend instead.

[ This feature will only work with the relevant changesets from
  qemu-xen-unstable, recently applied.  -iwj ]

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c          |    5 ++++-
 tools/libxl/libxl_device.c   |    1 +
 tools/libxl/libxl_internal.h |    1 +
 3 files changed, 6 insertions(+), 1 deletion(-)

diff -r 91143941c492 -r 9ffd785319e0 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Tue Nov 23 19:21:22 2010 +0000
+++ b/tools/libxl/libxl.c       Tue Nov 23 19:23:22 2010 +0000
@@ -1856,7 +1856,10 @@ int libxl_device_disk_add(libxl_ctx *ctx
             flexarray_set(back, boffset++, libxl__sprintf(&gc, "%s:%s",
                           
libxl__device_disk_string_of_phystype(disk->phystype), disk->physpath));
 
-            device.backend_kind = DEVICE_TAP;
+            if (libxl__blktap_enabled(&gc))
+                device.backend_kind = DEVICE_TAP;
+            else
+                device.backend_kind = DEVICE_QDISK;
             break;
 
         default:
diff -r 91143941c492 -r 9ffd785319e0 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Tue Nov 23 19:21:22 2010 +0000
+++ b/tools/libxl/libxl_device.c        Tue Nov 23 19:23:22 2010 +0000
@@ -33,6 +33,7 @@ static const char *string_of_kinds[] = {
     [DEVICE_VIF2] = "vif2",
     [DEVICE_VBD] = "vbd",
     [DEVICE_TAP] = "tap",
+    [DEVICE_QDISK] = "qdisk",
     [DEVICE_PCI] = "pci",
     [DEVICE_VFB] = "vfb",
     [DEVICE_VKBD] = "vkbd",
diff -r 91143941c492 -r 9ffd785319e0 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h      Tue Nov 23 19:21:22 2010 +0000
+++ b/tools/libxl/libxl_internal.h      Tue Nov 23 19:23:22 2010 +0000
@@ -82,6 +82,7 @@ typedef enum {
     DEVICE_VIF2,
     DEVICE_VBD,
     DEVICE_TAP,
+    DEVICE_QDISK,
     DEVICE_PCI,
     DEVICE_VFB,
     DEVICE_VKBD,

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools/libxl: use qdisk if blktap2 is not available, Xen patchbot-unstable <=