{
  "slug": "writev",
  "term": "writev",
  "aliases": [
    "writev()",
    "vectored write",
    "gather write"
  ],
  "definition": "writev is a vectored I/O operation that writes an ordered array of buffers to a file descriptor and reports the total number of bytes transferred.",
  "note": "Buffers are consumed in array order; the return value counts bytes, not completed buffers. [python-writev] Hesela's three controlled Linux child processes submitted AB and CDEF with file-size limits of 2, 3 and 6 bytes. The middle case returned 3 and read back ABC, leaving DEF rather than the entire second buffer. The two incomplete cases then reported EFBIG on retry. These are deliberate limits, not measured device failures. [hesela-observation] A single vectored call is distinct from several write calls; neither its interface nor a full count alone establishes post-crash persistence. [readv-api]",
  "advantages": [
    "Accepts separate buffers without requiring the application to concatenate them into one byte string."
  ],
  "limitations": [
    "A successful return can stop inside an individual buffer; retries must advance by bytes.",
    "No performance benchmark, concurrency test, direct I/O or power interruption was performed in the Hesela observation."
  ],
  "related": [
    "short-write",
    "pwrite",
    "o-append",
    "torn-write",
    "fsync"
  ],
  "citations": [
    {
      "id": "readv-api",
      "title": "Linux man-pages 6.19: readv(2), writev ordering and return-value semantics",
      "url": "https://man7.org/linux/man-pages/man2/readv.2.html",
      "accessed": "2026-10-17"
    },
    {
      "id": "python-writev",
      "title": "Python 3.12 documentation: os.writev",
      "url": "https://docs.python.org/3.12/library/os.html#os.writev",
      "accessed": "2026-10-17"
    },
    {
      "id": "hesela-observation",
      "title": "Hesela: controlled vectored-write observation with environment and source SHA-256",
      "url": "https://hesela.dev/research/write-submission/vectored-observation.json",
      "accessed": "2026-10-17"
    },
    {
      "id": "hesela-publication",
      "title": "Hesela: Atomic rename is not a durable commit",
      "url": "https://hesela.com/analyses/atomic-rename-directory-durability/#vectored-submission",
      "accessed": "2026-10-17"
    }
  ],
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-17"
}
