readv · shipping · also readv(), vectored read, scatter input

readv

readv reads data from a file descriptor into an ordered array of memory buffers.

Related Observatory article: readv on hesela.com

Buffers are filled in array order: each earlier buffer is filled before the next receives data, and the returned count is the total bytes transferred across the vector. A successful short read can therefore stop inside a buffer; it does not make the remaining capacity valid input. Python's os.readv exposes this ordered-buffer contract [3]. On a seekable file, readv uses the open file description's current file offset and advances it by the bytes actually read [2]. This differs from preadv's explicit-position contract. The vector supplies memory destinations, not separate file offsets [1].

Relations

related
preadv, pread, Short read, File offset, Open file description, writev

Advantages

  • Places input into multiple caller-provided buffers in one call.

Limitations

  • A nonnegative return count does not guarantee that every buffer was filled.
  • Buffer count is bounded by the implementation's IOV_MAX limit.

Citations

  1. Linux man-pages: readv(2), DESCRIPTION, RETURN VALUE and NOTES (accessed 2026-11-02)
  2. Linux man-pages: read(2), DESCRIPTION and RETURN VALUE (accessed 2026-11-02)
  3. Python documentation: os.readv (accessed 2026-11-02)
Sources & caveats
  • Primary API documentation reviewed 2026-11-02; no native measurement, throughput test or storage-failure estimate.

JSON: /data/terms/readv.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. readv. Hesela. 2026-11-02. https://hesela.dev/terms/readv/