Re: [PATCH 9/8] qemu: Allow volume type disk for device 'lun'

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

 



On 04/05/2013 01:07 PM, Osier Yang wrote:
> This allows one use block type volume as the disk source for device
> 'lun'.
> ---
>  src/qemu/qemu_command.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 

ACK - seems reasonable.

John
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index c29796d..2fc63ae 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -3131,10 +3131,11 @@ qemuBuildDriveDevStr(virDomainDefPtr def,
>                                 virDomainDiskProtocolTypeToString(disk->protocol));
>                  goto error;
>              }
> -        } else if (disk->type != VIR_DOMAIN_DISK_TYPE_BLOCK) {
> -            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -                           _("disk device='lun' is not supported for type='%s'"),
> -                           virDomainDiskTypeToString(disk->type));
> +        } else if (disk->type != VIR_DOMAIN_DISK_TYPE_BLOCK &&
> +                   !(disk->type == VIR_DOMAIN_DISK_TYPE_VOLUME &&
> +                     disk->srcpool->voltype == VIR_STORAGE_VOL_BLOCK)) {
> +            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> +                           _("disk device='lun' is only valid for block type disk source"));
>              goto error;
>          }
>          if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BLK_SG_IO)) {
> 

--
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]