cache-flush · shipping · also write cache flush, REQ_PREFLUSH

Storage cache flush

A storage cache flush requests persistence of writes buffered in the addressed storage stack, with its coverage and ordering defined by that interface.

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 write carrying FUA 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.

SCSI SYNCHRONIZE CACHE with IMMED=1 acknowledges validation before synchronization completes. SYNC_PROG=00 offers no pollable progress sense; silence is not completion evidence. Modes 01 and 10 report progress with NO SENSE and NOT READY respectively; mode 10 also rejects commands needing occupied resources, except specified discovery commands. Unsupported IMMED=1 is rejected. [4]

In Hesela's eight isolated Linux v6.12 function controls, FILEIO and IBLOCK each returned GOOD before an injected backend error when IMMED was set; non-immediate error controls reported CHECK CONDITION. All helper return values were zero. These are stubbed function observations, not device I/O, later deferred-error reporting or crash-survival tests. The separate sd_sync_cache initiator helper leaves IMMED clear. [5] [6] [8] [7]

For SYNCHRONIZE CACHE (10), zero NUMBER OF BLOCKS covers the supplied LBA through the medium's end, not no blocks. Linux v6.12 IBLOCK flushes the whole cache, so a narrow requested range does not imply less backend work. [4] [6]

Relations

related
Force Unit Access, Write-back cache, Write-through cache, fsync, Persistence ordering, SCSI deferred error, NVMe volatile write cache, Storage cache barrier, CLWB, CLFLUSHOPT, HORAE

Advantages

  • Provides a persistence boundary for earlier completed writes in a stack that honors the request. [1]

Limitations

  • A successful lower-layer flush does not certify an application's complete recovery protocol. [1, 3]
  • Early acknowledgement and a quiet progress channel do not certify completed synchronization; IMMED and the device's supported reporting mode matter. [4]
  • SYNCHRONIZE CACHE may complete with data in non-volatile cache, not yet on the medium, and does not require cache eviction. [4]

Citations

  1. Linux kernel documentation. Explicit volatile write back cache control: REQ_PREFLUSH and REQ_FUA. (accessed 2026-10-12)
  2. NFS stable writes: what COMMIT, flush and FUA actually promise (accessed 2026-10-12)
  3. Seagate SCSI Commands Reference Manual Rev. L (November 2020), section 3.55, Tables 214-215: IMMED and SYNC_PROG. (accessed 2026-11-07)
  4. Linux v6.12 pinned source: fd_execute_sync_cache, FILEIO status and fsync ordering. (accessed 2026-11-04)
  5. Linux v6.12 pinned source: iblock_end_io_flush and iblock_execute_sync_cache. (accessed 2026-11-05)
  6. Linux v6.12 pinned source: sd_sync_cache leaves IMMED clear. (accessed 2026-11-04)
  7. Hesela: eight isolated-function SCSI IMMED observations; injected outcomes, not device I/O. (accessed 2026-11-04)

Further reading

  1. Linux kernel documentation. Device-mapper cache: operating modes and on-disk metadata. (accessed 2026-10-12)
Sources & caveats
  • The SYNC_PROG mode comparison follows Seagate Rev. L (2020), section 3.55 and Table 215; it is not a measurement of a drive default. [4]
  • Range semantics are a manual/source comparison, not an additional device experiment or latency measurement. [4] [6]

JSON: /data/terms/cache-flush.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Storage cache flush. Hesela. 2026-11-29. https://hesela.dev/terms/cache-flush/