top | item 43174899

(no title)

BWStearns | 1 year ago

I have file A that's in two places and I run this.

I modify A_0. Does this modify A_1 as well or just kind of reify the new state of A_0 while leaving A_1 untouched?

discuss

order

madeofpalk|1 year ago

It's called copy-on-write because when you modify A_0, it'll make a copy of the file if you write to it but not A_1.

https://en.wikipedia.org/wiki/Copy-on-write#In_computer_stor...

bsimpson|1 year ago

Which means if you actually edited those files, you might fill up your HD much more quickly than you expected.

But if you have the same 500MB of node_modules in each of your dozen projects, this might actually durably save some space.

BWStearns|1 year ago

Thanks for the clarification. I expected it worked like that but couldn't find it spelled out after a brief perusal of the docs.

kdmtctl|1 year ago

What will happen when the original file will be deleted? Often this handled by block reference counters, which just would be decreased. How APFS handles this? Is there any master/copy concepts or just block references?