[Libguestfs] Libguestfs Rsync-in with delta transfer enabled

Ajay Nemade ajay.nemade at trilio.io
Sat Jun 18 12:48:58 UTC 2022


Hi,

I am exploring libguestfs rsync-in to copy the incremental changes to
qcow2. I am following rsync example
<https://rwmj.wordpress.com/2013/04/22/using-rsync-with-libguestfs/> 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
<https://github.com/libguestfs/libguestfs/blob/master/daemon/rsync.c#L40> 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.

Thanks,
Ajay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20220618/ba55189b/attachment.htm>


More information about the Libguestfs mailing list