Whenever blktap2 is not available use qdisk as block backend instead.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
diff -r 388c44a63613 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Wed Nov 10 14:56:06 2010 +0000
+++ b/tools/libxl/libxl.c Thu Nov 18 12:45:03 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 388c44a63613 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c Wed Nov 10 14:56:06 2010 +0000
+++ b/tools/libxl/libxl_device.c Thu Nov 18 12:45:03 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 388c44a63613 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h Wed Nov 10 14:56:06 2010 +0000
+++ b/tools/libxl/libxl_internal.h Thu Nov 18 12:45:03 2010 +0000
@@ -82,6 +82,7 @@ typedef enum {
DEVICE_VIF2,
DEVICE_VBD,
DEVICE_TAP,
+ DEVICE_QDISK,
DEVICE_PCI,
DEVICE_VFB,
DEVICE_VKBD,
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|