rwf-dsync · shipping · also per-write data-integrity completion

RWF_DSYNC

RWF_DSYNC is a Linux per-write flag that requests synchronized data-integrity completion for the range written by pwritev2().

Documented since Linux 4.7, this is the per-call counterpart of O_DSYNC, and does not change the synchronization mode stored in the open file description. Within the preadv2/pwritev2 pair, the flag affects writes, not reads; check the returned byte count for a short transfer. [1]

Data-integrity completion includes metadata needed to retrieve the data, such as a file-length extension; it is not a metadata-free write. A timestamp-only change does not have the same retrieval requirement. [2]

Linux v6.12 combines per-call synchronization bits with inherited open-mode bits: RWF_DSYNC does not downgrade an O_SYNC file. This is source inspection, not a power-loss test. [3]

A historical ext3-ordered experiment in OSDI 2014 found that synchronizing one file waited for another file's earlier data. This illustrates coupled persistence work, not an RWF_DSYNC latency measurement. [6]

Relations

related
RWF_SYNC, O_DSYNC, fdatasync, Directory fsync, Short write, RWF_ATOMIC, Open file description

Advantages

  • Selects data-integrity completion for a write without reopening the file.

Limitations

  • Does not provide torn-write protection or a multi-file transaction.
  • Does not establish persistence of a new directory entry.
  • Does not promise a smaller physical flush or lower latency.

Citations

  1. Linux man-pages: readv(2), per-write flags and short transfers (accessed 2026-11-12)
  2. Linux man-pages: open(2), synchronized I/O completion (accessed 2026-11-12)
  3. Linux v6.12: init_sync_kiocb, iocb_flags, kiocb_set_rw_flags and generic_write_sync (accessed 2026-11-12)
  4. Pillai et al., OSDI 2014: All File Systems Are Not Created Equal, section 4.6 (p. 445) (accessed 2026-11-12)

Further reading

  1. Hesela: Per-write flags add requirements; they do not downgrade the open mode (accessed 2026-11-12)
  2. Linux man-pages: fsync(2), file and directory persistence (accessed 2026-11-12)

JSON: /data/terms/rwf-dsync.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. RWF_DSYNC. Hesela. 2026-11-12. https://hesela.dev/terms/rwf-dsync/