3

A webpage referenced by the Wikipedia article on Btrfs claims that (emphasis mine)

[Btrfs] reflinks have the same use as hardlinks, but are more space efficient.

I thought that the opposite was true—that hardlinks are more space-efficient because a hardlink creates only a directory entry that points to the existing inode, whereas a reflink creates a directory entry, an inode, and file metadata.

Furthermore, a reflink duplicates file data if the data is inlined within the metadata, whereas this never happens with a hardlink because there is no new metadata for the file.

Am I correct?

  • 5
    Your reasoning seems correct to me. I would even disagree with the other part of the quoted statement: "reflinks have the same use as hardlinks". No, they don't have the same use, because if you subsequently open the file by one of its 2 names and make modifications, something entirely different happens in each case. – Celada Feb 21 '16 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.