DO NOT REPLY [Bug 7778] --inplace does extra WRITE operations

samba-bugs at samba-bugs at
Mon Nov 8 19:24:21 MST 2010

wayned at changed:

           What    |Removed                     |Added
             Status|NEW                         |ASSIGNED

------- Comment #7 from wayned at  2010-11-08 20:24 CST -------
This is caused by the repetition of the file's data.  When rsync checks at
offset 1 in the receiving file for a matching block, it finds a match (because
all the blocks are identical after the first byte), and rsync never gets back
to the 1024-byte aligned blocks on the sender to notice that the data is
identical again.  If your data was not so repetitive, rsync would quickly sync
up and skip the rest of the writes.  (You can see what it is doing via either
the 3.1.0dev option --debug=deltasum3 or via -vvvv.)

I'm not sure how best the code could be improved to try to avoid this.  Matt's
idea of block-aligned checks could be made to work (given enough read-ahead),
but I'm not sure it's worth it, since it only affects very repetitive files.

I do note that the code that is looking for a (preferential) identical-position
block is wasting time when the receiving side block is not aligned with the
sending-side's blocks.  That is something that should be optimized.

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list