errseq-t · shipping · also errseq

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.

Related Observatory article: Read on hesela.com

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

related
Writeback error, fsync, Open file description, syncfs, Short write, sync_file_range

Limitations

  • Concurrent users of one observer cursor must serialize cursor updates.
  • Finite sequence space can collide; this is not an unlimited event journal.

Citations

  1. Linux v6.12: file_check_and_advance_wb_err in mm/filemap.c (accessed 2026-10-13)
  2. Linux v6.12: errseq_sample in lib/errseq.c (accessed 2026-10-20)
  3. Linux v6.12: syncfs and sync_filesystem in fs/sync.c (accessed 2026-10-15)
  4. Linux v6.12: MAX_ERRNO in include/linux/err.h (accessed 2026-10-20)
  5. Shashank Mohan Jain, LKML, 27 September 2026: errseq_check_and_advance lost-error interleaving; patch proposal, not a release-status claim (accessed 2026-10-25)
  6. Linux v6.12 lib/errseq.c: immutable source for the controlled helper replay (accessed 2026-10-25)

Further reading

  1. Linux kernel: The errseq_t datatype (accessed 2026-10-13)
  2. Hesela: Why retrying a failed fsync does not prove durability (accessed 2026-10-10)
  3. Linux v6.12: do_dentry_open in fs/open.c (accessed 2026-10-13)

JSON: /data/terms/errseq-t.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. errseq_t. Hesela. 2026-11-04. https://hesela.dev/terms/errseq-t/