handling of final partial block in rsync

Wayne Davison wayned at samba.org
Sat Oct 22 23:33:57 MDT 2011


On Fri, Oct 21, 2011 at 7:28 PM, Peter A. Friend <pafriend at octavian.org>wrote:

> I've read the thesis and the source again, and it looks like rsync is
> generating a signature on the final partial block. Would someone be able to
> confirm this, and is rsync handling this as I describe?
>

Search for "remainder" in generator.c and sender.c.  The checksum summary
mentions the number of checksums to expect, and the remainder length if the
last sum in the sequence is not a full-size block.  The sender makes a note
of each sum's length when it is received using a simple heuristic (if this
is the last sum, the sum's length is the remainder instead of the block
length IIF the remainder is non-zero).  When checksums are compared, a sum
can only match if the sum's length is the same as the block we are trying to
find.

..wayne..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20111022/ffc2aeee/attachment.html>


More information about the rsync mailing list