{
  "slug": "errseq-t",
  "term": "errseq_t",
  "aliases": [
    "errseq"
  ],
  "definition": "errseq_t is a Linux kernel datatype that records an error and sequence state so observers can detect failures since their saved cursor.",
  "note": "The 32-bit value records an error and sequence state, not an exact failure count or complete history. Advancing a cursor acknowledges observation, not repair. New observers skip an already-seen error but can still receive an unseen one; reopening is not a reliable historical-error check. The Linux generic writeback path keeps its cursor in the open file description, shared by duplicated descriptors. The pinned Linux v6.12 syncfs path uses a distinct filesystem-level f_sb_err cursor; observing that state does not advance the separate file-level f_wb_err cursor. [sync-source]\n\nIn Linux v6.12, later error codes replace earlier ones and repeated unseen errors can coalesce. A non-consuming check does not mark the state seen. With 19 counter bits, a full cycle can alias a dormant observer when the errno and seen bit also match; 524,288 is a counter period, not a device-failure threshold. Hesela's sequential example and script hash are available at https://hesela.dev/research/errseq-observation.json. [errseq-source] [errno-source]\n\nA separate v6.12 interleaving can hide a later error without counter wrap. A failed seen-bit compare-and-swap can advance a private cursor to an unstored value; later updates can recreate it. This uses distinct cursors, not concurrent misuse of one cursor. Jain reported the schedule on LKML. Hesela replays the unmodified helper with a deterministic userspace hook, not a running-kernel or failing-device test. No current-release status or incident rate is inferred. [errseq-race-report] [errseq-pinned]\n\nThe v6.12 sync_file_range wait helpers also advance f_wb_err: a byte-range wait is not a byte-range error record. Changing the requested range does not create a new observer. [filemap-source] [sync-source]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    "Concurrent users of one observer cursor must serialize cursor updates.",
    "Finite sequence space can collide; this is not an unlimited event journal."
  ],
  "related": [
    "writeback-error",
    "fsync",
    "open-file-description",
    "syncfs",
    "short-write",
    "sync-file-range"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "linux-errseq",
      "title": "Linux kernel: The errseq_t datatype",
      "url": "https://docs.kernel.org/core-api/errseq.html",
      "accessed": "2026-10-13"
    },
    {
      "id": "hesela-fsync",
      "title": "Hesela: Why retrying a failed fsync does not prove durability",
      "url": "https://hesela.com/analyses/fsync-failure-retry-durability/",
      "accessed": "2026-10-10"
    },
    {
      "id": "filemap-source",
      "title": "Linux v6.12: file_check_and_advance_wb_err in mm/filemap.c",
      "url": "https://github.com/torvalds/linux/blob/v6.12/mm/filemap.c",
      "accessed": "2026-10-13"
    },
    {
      "id": "open-source",
      "title": "Linux v6.12: do_dentry_open in fs/open.c",
      "url": "https://github.com/torvalds/linux/blob/v6.12/fs/open.c",
      "accessed": "2026-10-13"
    },
    {
      "id": "errseq-source",
      "title": "Linux v6.12: errseq_sample in lib/errseq.c",
      "url": "https://github.com/torvalds/linux/blob/v6.12/lib/errseq.c",
      "accessed": "2026-10-20"
    },
    {
      "id": "sync-source",
      "title": "Linux v6.12: syncfs and sync_filesystem in fs/sync.c",
      "url": "https://github.com/torvalds/linux/blob/v6.12/fs/sync.c",
      "accessed": "2026-10-15"
    },
    {
      "id": "errno-source",
      "title": "Linux v6.12: MAX_ERRNO in include/linux/err.h",
      "url": "https://github.com/torvalds/linux/blob/v6.12/include/linux/err.h",
      "accessed": "2026-10-20"
    },
    {
      "id": "errseq-race-report",
      "title": "Shashank Mohan Jain, LKML, 27 September 2026: errseq_check_and_advance lost-error interleaving; patch proposal, not a release-status claim",
      "url": "https://lists.openwall.net/linux-kernel/2026/09/27/146",
      "accessed": "2026-10-25"
    },
    {
      "id": "errseq-pinned",
      "title": "Linux v6.12 lib/errseq.c: immutable source for the controlled helper replay",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/lib/errseq.c",
      "accessed": "2026-10-25"
    }
  ],
  "updated": "2026-11-04"
}
