[Bug 6746] file from link-dest-source is copies and not linked for identical files

samba-bugs at samba.org samba-bugs at samba.org
Fri Apr 1 15:01:56 MDT 2011


--- Comment #8 from Matt McCutchen <matt at mattmccutchen.net> 2011-04-01 21:01:56 UTC ---
Created attachment 6364
  --> https://bugzilla.samba.org/attachment.cgi?id=6364
Test script

(In reply to comment #7)
> Alphabetical order matters.  If A has already been copied and B is a new
> hardlink, then all will work as expected.
> if B has already been copied, and A is the new hardlink, rsync v3 doesn't know
> it's an inode match until later in the transfer.

Ah... That behavior is by design (see the last paragraph of the description of
--hard-links in the man page), but it's pretty annoying that it can waste space
with --link-dest.  See the attached test script.

The fix would be to check every file entry against the --link-dest dir even if
a previous hard link has already been transferred, and if there is a match, go
back and replace all the previous hard links with links to the --link-dest
file.  This would require rsync to store all the previous hard link paths
instead of just the last one.

Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the rsync mailing list