Wayne Davison wrote: >On Thu, Feb 09, 2006 at 03:04:17PM +0100, Paul Slootman wrote: > > >>compare inode and device number. When those are the same, the two files >>must be hardlinked. >> >> > >Also, rsync only considers files that have a link count larger than 1 >(see stat()'s st_nlink) since this allows it to ignore the vast majority >of files that have only one link into a filesystem. > >..wayne.. > > Do we also discard the info once we found file names in a quantity that matches the link count? This should allow us to dramatically reduce the memory usage for large transfers.
Example: Found file "foo1" with dev 304, link count of 2 and inode 17. Cache it. Found file "bar1" with dev 304, link count of 3 and inode 18. Cache it. Found file "bar2" with dev 304, link count of 3 and inode 18. Mark it as link to bar1. Found file "foo2" with dev 304, link count of 2 and inode 17. Mark it as link to foo1 and remove the link cache (found two matches to a file that has two links). Shachar -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html