Hacker News new | ask | show | jobs
by boomboomsubban 2337 days ago
How is linking based on file and linking based on block "totally different?"
3 comments

Hard links are essentially the filename that points to an inode. Creating a hard link creates just another filename associated with the same inode. Once a hard link, always a hard link, until destroyed.

Reflink has its own fs metadata including inode, with (initially) shared extents. Those shared extents can have their blocks individually and independently modified, per file. The point at which there are no more shared blocks, they're not reflinks.

IIUC: If you hard link two files, changing one file changes the other. If you dedupe two blocks, it will copy-on-write, meaning that changing one block does not change the other.

It's not an intrinsic property of file-dedupe vs block-dedupe. It's just how it's conventionally done.

hardlinks are paths pointing to the same inode - the same metadata, the same contents - they are the same file - just happen to have multiple addresses.

Inodes that happen to share blocks are not the same file. ie totally different.