On 6/30/07, Wayne Davison <[EMAIL PROTECTED]> committed:
Added Files: checksum-xattr.diff Log Message: A simple patch that lets rsync use cached checksum values stored in each file's extended attributes. A perl script is provided to create and update the values.
Wayne, You should be aware of two drawbacks of caching checksums in xattrs: First, setting the xattr hits the file's ctime. Thus, in exchange for rsync being able to skip the file, other tools that use ctime (such as GNU tar incremental backups) unnecessarily reprocess it. Beagle also caches checksums in xattrs, and one of its users complained about the effect on the ctime: http://www.mail-archive.com/[EMAIL PROTECTED]/msg03251.html Second, it is impossible to make xattr-based checksum caching foolproof against same-second modification. Suppose a file is written during second 5 and then rsync caches its checksum during second 8; now the file has mtime 5 and ctime 8. Sometime later, rsync notices that the file still has mtime 5 and ctime 8. Does rsync trust the cached checksum? It must; otherwise the benefit of caching checksums would be lost. However, rsync will be fooled if the file was modified and then touched back to mtime 5 during second 8, right after the checksum was cached. This concern may not be relevant when the content is slowly changing. Matt -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html