rmlint can be used to dedup the files, which can support reflink.
I was using reflink dedup for BTRFS, but end up, I changed to hardlink. I think hardlink is more commonly used in Unix environment
rmlint -T df --config=sh:handler=hardlink /dedup
This will dedup the files in /dedup directory, and will generate a file called
rmlint.sh in current directory. Run that shell script, will change duplicated files to hard link.
-T df means dedup files.
config=sh means generate shell script
handler=hardlink means generate script using hardlink dedup
There are many options, but I don't use them.