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

[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


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