[Libguestfs] [PATCH] lib: libvirt: Pass copyonread flag through to the libvirt XML.

Pino Toscano ptoscano at redhat.com
Fri Jun 30 08:30:26 UTC 2017


On Friday, 30 June 2017 01:01:36 CEST Richard W.M. Jones wrote:
> From: "Richard W.M. Jones" <rjones at redhat.com>
> 
> We were dropping the add_drive copyonread flag when using the libvirt
> backend.  This resulted in significant performance degradation (2x-3x
> slower) when running virt-v2v against VMware servers.
> 
> Thanks: Kun Wei.
> ---
>  lib/launch-libvirt.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c
> index 948350b..72f86ba 100644
> --- a/lib/launch-libvirt.c
> +++ b/lib/launch-libvirt.c
> @@ -1593,7 +1593,8 @@ construct_libvirt_xml_disk (guestfs_h *g,
>  
>        if (construct_libvirt_xml_disk_driver_qemu (g, data, drv, xo, format,
>                                                    drv->cachemode ? : "writeback",
> -                                                  drv->discard, false)
> +                                                  drv->discard,
> +						  drv->copyonread)

LGTM, but please fix the indentation.

Thanks,
-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170630/19f48622/attachment.sig>


More information about the Libguestfs mailing list