On Sat, Jun 18, 2022 at 06:18:58PM +0530, Ajay Nemade wrote:
Hi,
I am exploring libguestfs rsync-in to copy the incremental changes
to qcow2. I am following rsync example to use the rsync-in. As per
the example, I am using rsync daemon and rysnc-in is working for
me. But, If the changes are in the same file then the complete file
is getting transferred.
For example, if my file is of 100Mi then the first qcow2 is of
approx 105Mi. After the first qcow2, I am appending data of 20Mi
and then creating the second qcow2 using the first qcow2 as a
backing file. Here then the second qcow2 should have been around
approx 22Mi but it's showing 125Mi in qemu-img info.
From the above observation, I think the delta transfer algorithm is
not getting used while doing rsync-in.
Just out of curiosity, I tried adding arg --no-whole-file in this
function but it's still not working.
Can anyone please point me to how to enable the delta transfer
algorithm? Is it already supported ? or Do I need to make changes in
the code? If yes, then please let me know the places where I should
add the changes.
I'm not sure I know the correct answer.
I guess you have already tried modifying this code:
https://github.com/libguestfs/libguestfs/blob/60e8ea0312d94860403c956f0f1...
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org