Re: [PATCH 6/6] qemu: Support only raw volumes in qemuDomainBlockPeek

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

 




On 06/23/2017 09:33 AM, Peter Krempa wrote:
> The API documents that it peeks into the VM disk. We can't do that
> currently for non raw images so report an error.
> ---
>  src/qemu/qemu_driver.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 115368d1d..53655749b 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -11328,6 +11328,12 @@ qemuDomainBlockPeek(virDomainPtr dom,
>          goto cleanup;
>      }
> 
> +    if (disk->src->format != VIR_STORAGE_FILE_RAW) {
> +        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
> +                       _("peeking is supported only for RAW disks"));
> +        goto cleanup;

Just noting that cleanup will call virStorageFileDeinit. Although
virStorageFileInitAs wouldn't be called since tis won't call
qemuDomainStorageFileInit, but it shouldn't matter since
virStorageFileDeinit does check if virStorageFileIsInitialized - just a
concern that some how some "future" change to Deinit does something that
assumes Init was run. I would hope not, but just pointing it out...

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John
> +    }
> +
>      if (qemuDomainStorageFileInit(driver, vm, disk->src) < 0)
>          goto cleanup;
> 

--
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]
  Powered by Linux