short-read · shipping · also partial read

Short read

A short read is a byte-read operation that successfully returns fewer bytes than requested.

Related Observatory article: Short read on hesela.com

A positive partial result is not itself an error or proof of end-of-file. For an ordinary regular-file read requesting a positive length, zero indicates EOF; a zero-length request can also return zero without establishing EOF. Device and message-oriented interfaces can have different contracts. [1]

Linux read(2) documents a per-call transfer ceiling of 0x7ffff000 (2,147,479,552) bytes on both 32-bit and 64-bit systems. A larger valid request therefore needs more than one call even when sufficient file data remain. This is a Linux syscall limit, not a universal threshold for every read interface. [1]

pread reads at an explicit offset without moving the shared file position, but can still return fewer bytes than requested. Application-design implication: an exact-length consumer must account for the remaining range and distinguish premature EOF from a complete record; choosing offsets does not freeze the file against concurrent changes. [2]

For an ordinary one-shot io_uring read, inspect CQE.res: it carries the byte count or negative errno, not the result of submitting the request. [4] The liburing helper warns against concurrent use of the shared current offset unless access is serialized. [3]

Relations

related
Short write, io_uring completion queue entry

Advantages

  • The returned count identifies how many bytes the caller can consume from this operation. [1]

Limitations

  • A successful short count does not by itself diagnose a media fault.
  • Completing the requested byte count does not establish integrity, authenticity or a consistent source version.

Citations

  1. Linux man-pages 6.19: read(2), partial results, EOF and zero-length requests (accessed 2026-10-25)
  2. Linux man-pages 6.19: pread(2), explicit offsets and partial transfers (accessed 2026-10-25)
  3. liburing 2.9: io_uring_prep_read(3), offsets and completion results (accessed 2026-10-25)
  4. liburing: io_uring_submit(3), submission counts versus operation results (accessed 2026-10-25)

Further reading

  1. Hesela: io_uring completion, ordering and durability (accessed 2026-10-25)
Sources & caveats
  • Source review of Linux read/pread manuals and the liburing-2.9 read-helper manual; no native io_uring experiment.
  • Exact-length consumption and source-version limitations are application-design implications, not measured failure rates.
  • Linux read(2) NOTES supplies the per-call ceiling; this is a documented API bound, not a measured throughput or io_uring limit.

JSON: /data/terms/short-read.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Short read. Hesela. 2026-10-25. https://hesela.dev/terms/short-read/