dm-writecache · shipping · also device-mapper writecache, LVM writecache

dm-writecache

dm-writecache is a Linux device-mapper target that buffers writes on persistent memory or SSD before writing cached data to an underlying device.

Read admission: LVM distinguishes writecache from the read/write hot-spot cache type. Origin read misses do not populate writecache; reads can still hit data already cached by writes. [3] [2]

Persistence: A normal block FLUSH commits cache state without requiring every cached block to reach the origin. The administrative flush message instead requests all-block writeback and waits; these are different interfaces. [2]

Cleaning: cleaner stops admitting uncached writes but still caches updates to existing entries to preserve ordering. Enabling it is not evidence that draining has finished; inspect status and follow the documented removal sequence. [1]

Configuration: The fua and nofua writeback options apply only to persistent-memory mode. nofua uses a subsequent origin flush, not an unconditional omission of persistence handling. [1] [2]

Relations

related
Write-back cache, Persistent block cache

Limitations

  • A committed cache can remain necessary for recovery while the origin holds older data. The autocommit_time timer queues cache-commit work; it is not an origin-writeback deadline or an application synchronization operation. [2]

Citations

  1. Linux v6.12: writecache target, cleaner, commit controls and removal sequence (accessed 2026-12-01)
  2. Linux v6.12 dm-writecache.c: read routing, cache commit and process_flush_mesg (accessed 2026-12-01)
  3. LVM2 v2.03.28 lvmcache(7): distinct cache and writecache LV types (accessed 2026-12-01)

Further reading

  1. Hesela: NFS stable writes, cache commits and origin writeback (accessed 2026-12-01)
Sources & caveats
  • Version-scoped documentation and source review; no device-mapper target, hardware benchmark or power-loss experiment was run.

JSON: /data/terms/dm-writecache.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. dm-writecache. Hesela. 2026-12-01. https://hesela.dev/terms/dm-writecache/