It's clear, with cp --reflink foo bar
I can copy a file on btrfs without wasting space. But how can I detect that the two files (foo and bar here) are using the same "space unit"?
If they were hardlinks, I would use [ foo -ef bar ]
for comparing or stat -c%i foo
to get a unique id (inode in this case).
Are there similar commands for btrfs reflinked files?
I want to apply this on a 300G volume which is virtually 6T in size due to deduplication, so I want to avoid checksumming...