Hacker News new | ask | show | jobs
by aeontech 480 days ago
If I understand correctly, a COW clone references the same contents (just like a hardlink) as long as all the filesystem references are pointing to identical file contents.

Once you open one of the reference handles and modify the contents, the copy-on-write process is invoked by the filesystem, and the underlying data is copied into a new, separate file with your new changes, breaking the link.

Comparing with a hardlink, there is no copy-on-write, so any changes made to the contents when editing the file opened from one reference would also show up if you open the other hardlinks to the same file contents.

2 comments

ah, that's where the copy-on-write takes place. sometimes, just reading it written by someone else is the knock upside the head I need.
That’s correct.