3 ms·
Sadly that’s not what copy on write means. When you have file a and you copy it to file b. COW means the copy b will only be truly materialized once you write s
by bruce343434 5y ago
Sadly that’s not what copy on write means. When you have file a and you copy it to file b. COW means the copy b will only be truly materialized once you write something to it/edit it. Before that, file b will be aliased to file a.
- mrighele 5y agoIf you have file A and a make a snapshot of it, let's call it A@2022-04-01-12:00, you have now two different files pointing at the same blocks. If you write to one of the blocks of A you will not overwrite any data of A@2022-04-01-12:00 because the new data will be saved to a different block. I would call that copy on write. I admit that the description is not perfect because it doesn't always apply (like in the example you make), but I couldn't come up with a more appropriate description and for the discussion at hand I thought it was quite apt. Also, for what is worth, Wikipedia seems to agree with me [1] [1] https://en.wikipedia.org/wiki/Copy-on-write#In_computer_storage https://en.wikipedia.org/wiki/Copy-on-write#In_computer_stor...