4 ms·
It's essentially duplicating the file metadata into a new inode with shared data extents and incrementing the extent backref count so that the extent tree with
by cmurf 7y ago
It's essentially duplicating the file metadata into a new inode with shared data extents and incrementing the extent backref count so that the extent tree with those extents shows that there are multiple referrers.
If either file is written to, it's COW.
You can treat both files as if they are normal files, as if they're identical copies. It's just that the duplication doesn't take up additional space other than metadata.
A possible caution, just in general, on Btrfs is that each subvolume gets its own stash of inodes. In a subvolume, inode numbers are unique, you won't see the same inum in use more than once. But inode numbers aren't unique on the volume. So two completely unrelated files can have the same inum but they would be in different subvolumes (including snapshots where this is particularly noticable because a snapshot is really just a pointer to the parent subvolume and all the inums are unchanged.)