Re: [PATCH 2/2] libxl: support qdisk backend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 21, 2013 at 02:32:50PM -0600, Jim Fehlig wrote:
> libxl supports the LIBXL_DISK_BACKEND_QDISK disk backend, where qemu
> is used to provide the disk backend.  This patch simply maps the
> existing <driver name='qemu'/> to LIBXL_DISK_BACKEND_QDISK.
> ---
>  src/libxl/libxl_conf.c |   25 +++++++++++++++++++++++++
>  1 files changed, 25 insertions(+), 0 deletions(-)
> 
> diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
> index a47204e..e170357 100644
> --- a/src/libxl/libxl_conf.c
> +++ b/src/libxl/libxl_conf.c
> @@ -490,6 +490,31 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
>                                 l_disk->driverName);
>                  return -1;
>              }
> +        } else if (STREQ(l_disk->driverName, "qemu")) {
> +            x_disk->backend = LIBXL_DISK_BACKEND_QDISK;
> +            switch (l_disk->format) {
> +            case VIR_STORAGE_FILE_QCOW:
> +                x_disk->format = LIBXL_DISK_FORMAT_QCOW;
> +                break;
> +            case VIR_STORAGE_FILE_QCOW2:
> +                x_disk->format = LIBXL_DISK_FORMAT_QCOW2;
> +                break;
> +            case VIR_STORAGE_FILE_VHD:
> +                x_disk->format = LIBXL_DISK_FORMAT_VHD;
> +                break;
> +            case VIR_STORAGE_FILE_NONE:
> +                /* No subtype specified, default to raw */
> +            case VIR_STORAGE_FILE_RAW:
> +                x_disk->format = LIBXL_DISK_FORMAT_RAW;
> +                break;
> +            default:
> +                virReportError(VIR_ERR_INTERNAL_ERROR,
> +                               _("libxenlight does not support disk format %s "
> +                                 "with disk driver %s"),
> +                               virStorageFileFormatTypeToString(l_disk->format),
> +                               l_disk->driverName);
> +                return -1;
> +            }

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]