{
  "slug": "rwf-append",
  "term": "RWF_APPEND",
  "aliases": [
    "per-write append"
  ],
  "definition": "RWF_APPEND is a Linux pwritev2 flag that requests end-of-file placement for one write operation.",
  "note": "Documented since Linux 4.16, this flag selects append placement without changing the open file description's O_APPEND setting. [readv-api] [linux-rw-flags]\n\nA valid nonnegative offset leaves the shared current offset unchanged, even though data goes to the end of the file. Offset -1 instead updates that cursor after the transfer. Other negative offsets are rejected by the positional path. [linux-write-path]\n\nThe v6.17 per-operation flag validator rejects combining RWF_APPEND and RWF_NOAPPEND. A zero-total-length write can return before that validator; an empty call is not a reliable capability probe. [linux-rw-flags] [linux-write-path]\n\nAppend placement does not validate a log after a crash. The ALICE study separates persisted file size from contents and describes recovery failures even when an incompletely persisted appended region contains zeros. This is historical crash-model evidence, not a test of RWF_APPEND. [alice-append]",
  "advantages": [
    "Allows append placement without toggling status flags shared by duplicated descriptors."
  ],
  "limitations": [
    "Short writes still need byte accounting and a concurrency policy for completing a logical record. [readv-api]",
    "Does not by itself request synchronized completion or torn-write protection. [readv-api]"
  ],
  "related": [
    "rwf-noappend",
    "o-append",
    "pwrite",
    "file-offset",
    "open-file-description",
    "short-write",
    "writev",
    "fsync"
  ],
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-12",
  "citations": [
    {
      "id": "readv-api",
      "title": "Linux man-pages: readv(2), pwritev2 per-call flags and offset semantics",
      "url": "https://man7.org/linux/man-pages/man2/readv.2.html",
      "accessed": "2026-11-11"
    },
    {
      "id": "linux-rw-flags",
      "title": "Linux v6.17: kiocb_set_rw_flags validation and per-operation append state",
      "url": "https://github.com/torvalds/linux/blob/v6.17/include/linux/fs.h",
      "accessed": "2026-11-11"
    },
    {
      "id": "linux-write-path",
      "title": "Linux v6.17: pwritev2 dispatch, current offsets and zero-length write handling",
      "url": "https://github.com/torvalds/linux/blob/v6.17/fs/read_write.c",
      "accessed": "2026-11-11"
    },
    {
      "id": "hesela-publication",
      "title": "Hesela: Atomic rename is not a durable commit, per-write positioning",
      "url": "https://hesela.com/analyses/atomic-rename-directory-durability/#per-write-position",
      "accessed": "2026-11-11"
    },
    {
      "id": "alice-append",
      "title": "Pillai et al., OSDI 2014: All File Systems Are Not Created Equal, sections 2.1 and 4.4.2",
      "url": "https://research.cs.wisc.edu/adsl/Publications/alice-osdi14.pdf",
      "accessed": "2026-11-12"
    }
  ],
  "provenance": [
    "API documentation and pinned Linux v6.17 source review, not a native transfer, concurrency or crash experiment. [readv-api] [linux-rw-flags] [linux-write-path]"
  ]
}
