Re: [PATCH 6/9] qemu: always assume QEMU_CAPS_DRIVE_READONLY

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

 




On 05/20/2016 08:44 AM, Ján Tomko wrote:
> We have been always setting the capability on if qemu has
> QEMU_CAPS_DEVICE.
> ---
>  src/qemu/qemu_capabilities.c | 19 +++++++------------
>  src/qemu/qemu_command.c      | 39 +++++++--------------------------------
>  src/qemu/qemu_command.h      |  3 +--
>  src/qemu/qemu_hotplug.c      |  2 +-
>  4 files changed, 16 insertions(+), 47 deletions(-)
> 

[...]

> index acee310..48a6658 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -1283,8 +1283,7 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
>           disk->device == VIR_DOMAIN_DISK_DEVICE_LUN) &&
>          disk->bus != VIR_DOMAIN_DISK_BUS_IDE)
>          virBufferAddLit(&opt, ",boot=on");
> -    if (disk->src->readonly &&
> -        virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_READONLY)) {
> +    if (disk->src->readonly) {
>          if (disk->device == VIR_DOMAIN_DISK_DEVICE_DISK) {
>              if (disk->bus == VIR_DOMAIN_DISK_BUS_IDE) {
>                  virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> @@ -2064,16 +2063,8 @@ qemuBuildFSStr(virDomainFSDefPtr fs,
>      virBufferAsprintf(&opt, ",id=%s%s", QEMU_FSDEV_HOST_PREFIX, fs->info.alias);
>      virBufferAsprintf(&opt, ",path=%s", fs->src);
>  
> -    if (fs->readonly) {
> -        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_FSDEV_READONLY)) {
> -            virBufferAddLit(&opt, ",readonly");
> -        } else {
> -            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> -                           _("readonly filesystem is not supported by this "
> -                             "QEMU binary"));
> -            goto error;
> -        }
> -    }
> +    if (fs->readonly)
> +        virBufferAddLit(&opt, ",readonly");


^^

Was this unintentional?  FSDEV_READONLY is different than DRIVE_READONLY


John
>  
>      if (virBufferCheckError(&opt) < 0)
>          goto error;
> @@ -4493,8 +4484,7 @@ qemuBuildSCSIiSCSIHostdevDrvStr(virDomainHostdevDefPtr dev)
>  }
>  
>  char *

[...]

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