{
  "slug": "short-read",
  "term": "Short read",
  "aliases": [
    "partial read"
  ],
  "definition": "A short read is a byte-read operation that successfully returns fewer bytes than requested.",
  "note": "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. [read-api]\n\nLinux 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. [read-api]\n\npread 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. [pread-api]\n\nFor 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. [submit] The liburing helper warns against concurrent use of the shared current offset unless access is serialized. [prep-read]",
  "status": "shipping",
  "advantages": [
    {
      "text": "The returned count identifies how many bytes the caller can consume from this operation.",
      "citationIds": [
        "read-api"
      ]
    }
  ],
  "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."
  ],
  "related": [
    "short-write",
    "io-uring-cqe"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-25",
  "citations": [
    {
      "id": "read-api",
      "title": "Linux man-pages 6.19: read(2), partial results, EOF and zero-length requests",
      "url": "https://man7.org/linux/man-pages/man2/read.2.html",
      "accessed": "2026-10-25"
    },
    {
      "id": "pread-api",
      "title": "Linux man-pages 6.19: pread(2), explicit offsets and partial transfers",
      "url": "https://man7.org/linux/man-pages/man2/pread.2.html",
      "accessed": "2026-10-25"
    },
    {
      "id": "prep-read",
      "title": "liburing 2.9: io_uring_prep_read(3), offsets and completion results",
      "url": "https://github.com/axboe/liburing/blob/liburing-2.9/man/io_uring_prep_read.3",
      "accessed": "2026-10-25"
    },
    {
      "id": "submit",
      "title": "liburing: io_uring_submit(3), submission counts versus operation results",
      "url": "https://man7.org/linux/man-pages/man3/io_uring_submit.3.html",
      "accessed": "2026-10-25"
    },
    {
      "id": "hesela-uring",
      "title": "Hesela: io_uring completion, ordering and durability",
      "url": "https://hesela.com/analyses/io-uring-completion-ordering-durability/",
      "accessed": "2026-10-25"
    }
  ],
  "provenance": [
    "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."
  ]
}
