copy-on-write · shipping

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

  1. OpenZFS 2.3.4: txg.c, transaction-group lifecycle and synchronization (accessed 2026-10-14)
  2. Linux v6.16: Btrfs tree-log.c, design comment and replay implementation (accessed 2026-10-15)

Further reading

  1. Copy-on-write (storage) (accessed 2026-03-26)
  2. Linux man-pages: FICLONE and FICLONERANGE sharing semantics (accessed 2026-10-13)
  3. Linux man-pages: fallocate(2), unshare-range contract (accessed 2026-10-13)
  4. Sparse files, preallocation and thin-pool capacity (accessed 2026-10-13)
  5. Btrfs documentation: btrfs(5), datacow/nodatacow and datasum/nodatasum (accessed 2026-10-13)

JSON: /data/terms/copy-on-write.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Copy-on-write (storage). Hesela. 2026-11-21. https://hesela.dev/terms/copy-on-write/