Originally posted by mdedetrich
View Post
But this assumes that the data is always "old" or "new".
Unfortunately the parity is shared between the blocks of the stripe. This means that you lose the atomicity property (it is near impossible to guarantee an atomic writing in different disks without external structures like journal).
You can have the same property (atomicity) using a journal; but this is more expensive than a COW filesystem.
This is the reason why COW and raid5/6 mix bad; because you need something like a journal, when it is the purpose of the COW avoiding a journal...
Instead ZFS uses another technique, it puts the parity inside the extent, so it avoids the sharing of the parity between the different extent.
Originally posted by mdedetrich
View Post
a) you rewrite the all the portion of the extent 'protected' by the parity, but this has near the same cost of the COW over journal where you have to write all the data in the journal before putting the data in its final place; or
b) you write the new data + parity in a dedicated new extent, and leaving the old extent untouched; this of course implies that you can't release the space unused in the old extent until you do a balance (or defragment).
ZFS mitigates these issues by its cache (ARC).
Comment