errseq_t
errseq_t is a Linux kernel datatype that records an error and sequence state so observers can detect failures since their saved cursor.
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. [6]
In 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. [5] [7]
A 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. [8] [9]
The 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. [3] [6]
Relations
Limitations
- Concurrent users of one observer cursor must serialize cursor updates.
- Finite sequence space can collide; this is not an unlimited event journal.
Citations
- Linux v6.12: file_check_and_advance_wb_err in mm/filemap.c
- Linux v6.12: errseq_sample in lib/errseq.c
- Linux v6.12: syncfs and sync_filesystem in fs/sync.c
- Linux v6.12: MAX_ERRNO in include/linux/err.h
- Shashank Mohan Jain, LKML, 27 September 2026: errseq_check_and_advance lost-error interleaving; patch proposal, not a release-status claim
- Linux v6.12 lib/errseq.c: immutable source for the controlled helper replay