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

samba-bugs at samba.org samba-bugs at samba.org
Sun Nov 7 13:34:41 MST 2010


https://bugzilla.samba.org/show_bug.cgi?id=7778





------- Comment #5 from matt at mattmccutchen.net  2010-11-07 14:34 CST -------
(In reply to comment #4)
> But I still have a problem: if I do this:
> $ echo > f1
> $ dd bs=1M seek=1 count=0 of=f1
> $ dd bs=1M seek=1 count=0 of=f2
> $ du -h f?
> 4,0K    f1
> 0       f2
> $ rsync --inplace --no-whole-file f1 f2
> $ du -h f?
> 4,0K    f1
> 1,1M    f2
> 
> I still get target filled.

I see what is happening.  As the sender goes through the source file, it always
matches the data against a basis file block as soon as possible and then skips
the entire matched region of the source file.  So in this case, it skips the
'\n' and makes matches at offsets 1, 1025, ... of the source file against
arbitrary basis file blocks; it never gets to an aligned offset k*1024 where it
could match against basis data at the same offset.  To fix this, when
updating_basis_file is on, the sender would have to postpone making a
nonaligned match until it checks whether the next "block" of the source file
matches the basis file at the same offset.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- 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