Syncthing deduplication ioctl FICLONE

I have one file in multiple directories (for example jpeg in my family photo album and same file on my android phone backup). I have XFS filesystem which supports reflink (deduplication - ioctl FICLONE).

Would it be possible to support this feature in syncthing ? It seems it is not supported because duperemove always frees some disk space.


It is, but not enabled by default: copyRangeMethod — Syncthing documentation


and is it stable enough ? Which one from those you recommends ?

Thanks much.

Would it be possible to deduplicate shares from web GUI? Syncthing should have information about identical blocks/files.

Also it would be nice to fallocate files if they are filled with zeros (create sparse files)

You will have to experiment with which methods works for you based on the documentation. There is no after-the-fact deduplication. Sparse files are the default though, always.

Ok thanks

cp --reflink is using: ioctl(4, BTRFS_IOC_CLONE or FICLONE, 3) = 0

so I’ll try ioctl