Copy-on-write (storage)
A technique that writes modified blocks to new locations instead of overwriting in place.
For shared file data, writes must preserve the other file's contents and may require new allocation. Linux provides an unshare-range operation to prepare shared extents before later writes. Logical isolation does not create a separate failure domain. In Btrfs, nodatacow for newly created files also implies nodatasum; changing write placement can therefore change integrity coverage. In ZFS, copy-on-write transaction-group commit and intent logging solve different persistence steps; copy-on-write alone does not mean each system-call return is durable. [6] Btrfs also has a tree-log path and a full transaction-commit path for fsync; copy-on-write does not mean recovery needs no log. [7]
Relations
- related
- Storage snapshot, Solid-state drive (SSD), File storage, Reflink, Btrfs NODATASUM, ZFS transaction group, Copy-on-abundant-write, Btrfs tree log, LVM, Btrfs read-only subvolume, Thin-pool metadata, Copy-on-close, FALLOC_FL_UNSHARE_RANGE
Citations
- OpenZFS 2.3.4: txg.c, transaction-group lifecycle and synchronization
- Linux v6.16: Btrfs tree-log.c, design comment and replay implementation