{
  "slug": "cache-flush",
  "term": "Storage cache flush",
  "aliases": [
    "write cache flush",
    "REQ_PREFLUSH"
  ],
  "definition": "A storage cache flush requests persistence of writes buffered in the addressed storage stack, with its coverage and ordering defined by that interface.",
  "note": "In the Linux block layer, REQ_PREFLUSH makes previously completed writes persistent before an accompanying I/O starts; it can also be issued without a data payload. REQ_FUA instead covers persistence of the flagged write before its completion, and both flags may be combined. This block-level operation does not submit data still held only in an application buffer or establish multi-file transaction atomicity. Device-mapper layers must propagate the required persistence semantics.",
  "status": "shipping",
  "advantages": [
    {
      "text": "Provides a persistence boundary for earlier completed writes in a stack that honors the request.",
      "citationIds": [
        "linux-cache"
      ]
    }
  ],
  "limitations": [
    {
      "text": "A successful lower-layer flush does not certify an application's complete recovery protocol.",
      "citationIds": [
        "linux-cache",
        "hesela-stability"
      ]
    }
  ],
  "related": [
    "force-unit-access",
    "write-back-cache",
    "write-through-cache",
    "fsync",
    "persistence-ordering"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "linux-cache",
      "title": "Linux kernel documentation. Explicit volatile write back cache control: REQ_PREFLUSH and REQ_FUA.",
      "url": "https://docs.kernel.org/block/writeback_cache_control.html",
      "accessed": "2026-10-12"
    },
    {
      "id": "dm-cache",
      "title": "Linux kernel documentation. Device-mapper cache: operating modes and on-disk metadata.",
      "url": "https://docs.kernel.org/admin-guide/device-mapper/cache.html",
      "accessed": "2026-10-12"
    },
    {
      "id": "hesela-stability",
      "title": "NFS stable writes: what COMMIT, flush and FUA actually promise",
      "url": "https://hesela.com/analyses/nfs-stable-writes-flush-fua/",
      "accessed": "2026-10-12"
    }
  ],
  "updated": "2026-10-12"
}
