Richard W.M. Jones
2017-Jun-29 23:01 UTC
[Libguestfs] [PATCH] lib: libvirt: Pass copyonread flag through to the libvirt XML.
From: "Richard W.M. Jones" <rjones@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) == -1) return -1; } -- 1.8.3.1
Pino Toscano
2017-Jun-30 08:30 UTC
Re: [Libguestfs] [PATCH] lib: libvirt: Pass copyonread flag through to the libvirt XML.
On Friday, 30 June 2017 01:01:36 CEST Richard W.M. Jones wrote:> From: "Richard W.M. Jones" <rjones@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
Apparently Analagous Threads
- [RFC] lib: allow to specify physical/logical block size for disks
- Re: [RFC] lib: allow to specify physical/logical block size for disks
- [PATCH v2] lib: add support for disks with 4096 bytes sector size
- [PATCH] lib: allow to specify physical/logical block size for disks
- [PATCH 0/3] Add discard support.