{
  "slug": "dm-writecache",
  "term": "dm-writecache",
  "aliases": [
    "device-mapper writecache",
    "LVM writecache"
  ],
  "definition": "dm-writecache is a Linux device-mapper target that buffers writes on persistent memory or SSD before writing cached data to an underlying device.",
  "note": "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. [writecache-lvm] [writecache-source]\n\nPersistence: 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. [writecache-source]\n\nCleaning: 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. [writecache-doc]\n\nConfiguration: 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. [writecache-doc] [writecache-source]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "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.",
      "citationIds": [
        "writecache-source"
      ]
    }
  ],
  "related": [
    "write-back-cache",
    "persistent-block-cache"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-01",
  "citations": [
    {
      "id": "writecache-doc",
      "title": "Linux v6.12: writecache target, cleaner, commit controls and removal sequence",
      "url": "https://docs.kernel.org/6.12/admin-guide/device-mapper/writecache.html",
      "accessed": "2026-12-01"
    },
    {
      "id": "writecache-source",
      "title": "Linux v6.12 dm-writecache.c: read routing, cache commit and process_flush_mesg",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.12/drivers/md/dm-writecache.c",
      "accessed": "2026-12-01"
    },
    {
      "id": "writecache-lvm",
      "title": "LVM2 v2.03.28 lvmcache(7): distinct cache and writecache LV types",
      "url": "https://raw.githubusercontent.com/lvmteam/lvm2/v2_03_28/man/lvmcache.7_main",
      "accessed": "2026-12-01"
    },
    {
      "id": "hesela-stability",
      "title": "Hesela: NFS stable writes, cache commits and origin writeback",
      "url": "https://hesela.com/analyses/nfs-stable-writes-flush-fua/",
      "accessed": "2026-12-01"
    }
  ],
  "provenance": [
    "Version-scoped documentation and source review; no device-mapper target, hardware benchmark or power-loss experiment was run."
  ]
}
