rsync-patches icon indicating copy to clipboard operation
rsync-patches copied to clipboard

clone-dest.diff: hard-linking non-plain files is a bug

Open socketpair opened this issue 1 year ago • 0 comments

https://github.com/RsyncProject/rsync-patches/blame/10ab5e57446d10ef641ceb045ef3094e7d2bd439/clone-dest.diff#L154

All non-regular files are hard-linked (when possible).

This is a bug, because in contrast to reflinking, hard-linked files share metadata (like permissions, mtime and so on). That's why this option should not create hardlinks for items like symlinks.

Also, reflink should handle sparse file wisely. I did not test how it works for sparse files.

socketpair avatar Mar 12 '25 08:03 socketpair