libxl: QED disks support
PATCH v5 1/1 libxl: QED disks support
Qdisk supports qcow and qcow2, extend it to also support qed disk format.
---
v2:
* Add qed to the list for possible format values in xl-disk-configuration.txt
* Add LIBXL_HAVE_QED
v3:
* Remove the qed: obsolete prefix support
v4:
* Added backing format images in qemu-xen-security doc as requested by Ian
v5:
* Regenerated libxlu_disk.[ch]
--- docs/misc/qemu-xen-security | 1 + docs/misc/xl-disk-configuration.txt | 2 +- tools/libxl/libxl.h | 7 + tools/libxl/libxl_device.c | 1 + tools/libxl/libxl_dm.c | 1 + tools/libxl/libxl_types.idl | 1 + tools/libxl/libxl_utils.c | 2 + tools/libxl/libxlu_disk_l.c | 284 ++++++++++++++++++------------------ tools/libxl/libxlu_disk_l.h | 53 +++---- tools/libxl/libxlu_disk_l.l | 1 + 10 files changed, 179 insertions(+), 174 deletions(-)
docs/misc/qemu-xen-security +1 -0
@@ -4,6 +4,7 @@ a subset of all the possible QEMU emulators. Specifically: - network: e1000, rtl8139, virtio-net - storage: piix3 ide, ahci, xen_disk +- backing storage image format: raw, qcow, qcow2, vhd - graphics: cirris-vga, stdvga and xenfb - audio: sb16, es1370, ac97 - input: Xen PV keyboard and mouse (part of xenfb), USB and PS/2
docs/misc/xl-disk-configuration.txt +1 -1
@@ -87,7 +87,7 @@ format ------ Description: Specifies the format of image file. -Supported values: raw, qcow, qcow2, vhd +Supported values: raw, qcow, qcow2, vhd, qed Deprecated values: None Default value: raw
tools/libxl/libxl.h +7 -0
@@ -1012,6 +1012,13 @@ void libxl_mac_copy(libxl_ctx *ctx, libxl_mac *dst, const libxl_mac *src);*/ #define LIBXL_HAVE_MEMKB_64BITS 1 +/* +* LIBXL_HAVE_QED +* +* If this is defined QED disk formats can be used for both HVM and PV guests. +*/ +#define LIBXL_HAVE_QED 1 +typedef char **libxl_string_list ;void libxl_string_list_dispose (libxl_string_list *sl);int libxl_string_list_length (const libxl_string_list *sl);
tools/libxl/libxl_device.c +1 -0
@@ -411,6 +411,7 @@ char *libxl__device_disk_string_of_format(libxl_disk_format format)case LIBXL_DISK_FORMAT_VHD :return "vhd" ;case LIBXL_DISK_FORMAT_RAW :case LIBXL_DISK_FORMAT_EMPTY :return "aio" ; +case LIBXL_DISK_FORMAT_QED :return "qed" ;default :return NULL ; } }
tools/libxl/libxl_dm.c +1 -0
@@ -677,6 +677,7 @@ static const char *qemu_disk_format_string(libxl_disk_format format)case LIBXL_DISK_FORMAT_VHD :return "vpc" ;case LIBXL_DISK_FORMAT_RAW :return "raw" ;case LIBXL_DISK_FORMAT_EMPTY :return NULL ; +case LIBXL_DISK_FORMAT_QED :return "qed" ;default :return NULL ; } }
tools/libxl/libxl_types.idl +1 -0
@@ -114,6 +114,7 @@ libxl_disk_format = Enumeration("disk_format", [ (3, "VHD"), (4, "RAW"), (5, "EMPTY"), + (6, "QED"), ]) libxl_disk_backend = Enumeration("disk_backend", [
tools/libxl/libxl_utils.c +2 -0
@@ -317,6 +317,8 @@ int libxl_string_to_backend(libxl_ctx *ctx, char *s, libxl_disk_backend *backend *backend =LIBXL_DISK_BACKEND_QDISK ; }else if (!strcmp (p,"qcow2" )) { *backend =LIBXL_DISK_BACKEND_QDISK ; + }else if (!strcmp (p,"qed" )) { + *backend =LIBXL_DISK_BACKEND_QDISK ; } } out:
tools/libxl/libxlu_disk_l.c +145 -139
876 lines not on this page · raw message
tools/libxl/libxlu_disk_l.h +19 -34
120 lines not on this page · raw message
tools/libxl/libxlu_disk_l.l +1 -0
@@ -102,6 +102,7 @@ static void setformat(DiskParseContext *dpc, const char *str) { else if (!strcmp(str,"qcow2")) DSET(dpc,format,FORMAT,str,QCOW2); else if (!strcmp(str,"vhd")) DSET(dpc,format,FORMAT,str,VHD); else if (!strcmp(str,"empty")) DSET(dpc,format,FORMAT,str,EMPTY); + else if (!strcmp(str,"qed")) DSET(dpc,format,FORMAT,str,QED); else xlu__disk_err(dpc,str,"unknown value for format"); }
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 6 lines · Cédric Bosdonnat
Qdisk supports qcow and qcow2, extend it to also support qed disk format.
Signed-off-by Cédric Bosdonnat <[email protected]>Acked-by Ian Jackson <[email protected]>Acked-by Wei Liu <[email protected]>
This patch was pushed yesterday to staging branch.
To check whether a patch is pushed, please check staging, not master.
Patches will be pushed to master once they pass our integration test conducted by osstest.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel