|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 07/14] libxl: disks: Make LIBXL_DISK_BACKEND_UNKNOWN
libxl callers should not be required to specify the backend if they
don't want to. So LIBXL_DISK_BACKEND_UNKNOWN should instruct libxl to
choose the backend for itself.
More thorough fixes for the disk handling will follow.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
tools/libxl/libxl.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index fe012cb..73fc3e9 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -989,6 +989,21 @@ int libxl_device_disk_add(libxl_ctx *ctx, uint32_t domid,
libxl_device_disk *dis
device.domid = domid;
device.kind = DEVICE_VBD;
+
+ /*
+ * Fixing the incoming backend type to try to decide on which
+ * backend to use. Unfortunately at the moment this code is
+ * utterly broken, but it more or less works.
+ */
+
+ /*
+ * Backend type UNKNOWN should mean "caller does not want to specify",
+ * not "break pointlessely". (Callers should not be required to
+ * specify the backend if they don't want to.)
+ */
+ if (disk->backend == LIBXL_DISK_BACKEND_UNKNOWN)
+ disk->backend = LIBXL_DISK_BACKEND_TAP;
+
/* If blktap is not available then fallback to qdisk */
if (disk->backend == LIBXL_DISK_BACKEND_TAP && !libxl__blktap_enabled(&gc))
disk->backend = LIBXL_DISK_BACKEND_QDISK;
--
1.7.2.5
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH/RFC 00/14] libxl: disk configuration handling, Ian Jackson
- [Xen-devel] [PATCH 01/14] libxl: add missing copyright notices to some files, Ian Jackson
- [Xen-devel] [PATCH 02/14] libxl: add missing copyright notices to autogenerated files, Ian Jackson
- [Xen-devel] [PATCH 03/14] libxl: provide TOSTRING in libxl_internal.h and libxlu_internal.h, Ian Jackson
- [Xen-devel] [PATCH 04/14] libxl: make libxl_ctx_free tolerate NULL ctx argument, Ian Jackson
- [Xen-devel] [PATCH 05/14] libxl: disks: expose new "script" parameter for external block scripts, Ian Jackson
- [Xen-devel] [PATCH 06/14] libxl: disks: rename disk param "unpluggable" to "removable", Ian Jackson
- [Xen-devel] [PATCH 07/14] libxl: disks: Make LIBXL_DISK_BACKEND_UNKNOWN work,
Ian Jackson <=
- [Xen-devel] [PATCH 08/14] libxl: disks: new xlu_disk_parse function, Ian Jackson
- [Xen-devel] [PATCH 09/14] libxl: disks: commit libxlu_disk_l.[ch] flex output, Ian Jackson
- [Xen-devel] [PATCH 10/14] docs: update xl-disk-configuration.txt to describe new syntax, Ian Jackson
- [Xen-devel] [PATCH 11/14] xl: disks: replace config file disk spec parser with call to xlu_disk_parse, Ian Jackson
- [Xen-devel] [PATCH 12/14] xl: disks: replace block-attach disk config parser with call to xlu_parse_disk, Ian Jackson
- [Xen-devel] [PATCH 13/14] libxl: disks: allow specification of "backendtype=phy|tap|qdisk", Ian Jackson
- [Xen-devel] [PATCH 14/14] xl: xl block-attach -N (dry run) option, Ian Jackson
- Re: [Xen-devel] [PATCH 14/14] xl: xl block-attach -N (dry run) option, Ian Campbell
- Re: [Xen-devel] [PATCH 13/14] libxl: disks: allow specification of "backendtype=phy|tap|qdisk", Ian Campbell
- [Xen-devel] Re: [PATCH 12/14] xl: disks: replace block-attach disk config parser with call to xlu_parse_disk, Ian Jackson
|
|
|
|
|