filesystem-consistency-invariant · research · also File-system consistency invariant

Filesystem consistency invariant

A filesystem consistency invariant is a rule relating filesystem metadata that must hold at a defined consistency boundary.

Related Observatory article: Read on hesela.com

Recon checked metadata relationships at transaction commit, which differs from validating a block checksum. It interposed at the block layer, turned ext3 metadata updates into change records and let a transaction commit only when every invariant held. It covered the mandatory-feature checks of e2fsck, expressed as 101 SQCK rules, with 31 invariants, because many fields are easier to verify at runtime. [1]

In the 2012 corruption experiments, e2fsck still found errors in 28 of 731 cases (3.8%) when run again on a file system it had repaired. The reported 8% average throughput loss at 128 MB cache / 64 MB journal, and 15% worst loss at the smallest 64 MB cache, concern workload execution, not initial setup. Table 6 reports Webproxy setup at 323.0 versus 229.4 seconds with a 64 MB cache / 32 MB journal: 40.8% extra elapsed time, calculated from the printed means. [1]

The 2014 follow-up checked per-write location invariants as well, rather than assuming transactional writes were correct. These express atomicity and durability at each block write for journaling and shadow paging. Its Btrfs checker reached about 90% of native performance on a read-heavy web server profile once noatime was enabled. [2]

The 2014 checker treated revoked blocks as checkpointed when releasing transactions after metadata-to-data reuse. This prevents an older metadata image from overwriting newly stored file data. [2] JBD2 documentation distinguishes revocation from mere journal-version supersession; a one-transaction checkpoint model does not cover either mechanism. [4]

The 15 setup ratios use rounded means, not ratio confidence intervals or a benchmark rerun. Cache and journal sizes changed together. [5]

Relations

related
Checksum, Data scrubbing, Crash consistency, Write-ahead log, Copy-on-write (storage), Background fsck, Ext4 ordered mode, Journal checksum, Journal revoke record, Journal checkpoint, Crash-consistent filesystem repair, SQCK, Recon, ffsck

Advantages

  • Stops a corrupting metadata update before its transaction commits, rather than finding it later in an offline check. [1]

Limitations

  • Coverage depends on the specified rules, observation point and implementation; it does not establish application-level correctness. [1, 2]
  • Checks interpret on-disk formats independently of the file system code, so each format change needs matching interpretation code. [1]
  • The 2012 evaluation used transaction-layer commit checks and did not verify checkpointing. Its injector excluded misdirected writes; an unrecognized ext3 metadata target could be treated as data. [1]
  • The argument starts from consistent metadata and trusts the checker, its protected cache and lower storage layers. Passing commit-time checks alone is not proof that committed updates survive recovery. [1, 2]
  • The 2014 ext3 prototype added an on-disk metadata allocation bitmap; it was not an unmodified ext3 deployment. Its data-flush exception does not detect misdirected writes between data blocks. [2]

Citations

  1. Fryer et al. Recon: Verifying File System Consistency at Runtime. FAST 2012, sections 2.4, 4.1 and 5 (accessed 2026-11-13)
  2. Fryer et al. Checking the Integrity of Transactional Mechanisms. FAST 2014, sections 1-5 (accessed 2026-11-07)
  3. Linux kernel documentation: ext4 Journal (jbd2), Revocation Block; metadata-to-data reuse versus supersession (accessed 2026-11-07)
  4. Hesela: Recon setup-time arithmetic, all 15 published mean pairs and reproducible checks (accessed 2026-11-13)

Further reading

  1. Hesela: Disk scrubbing, checksum coverage and consistency boundaries (accessed 2026-10-13)
Sources & caveats
  • recon12 is Fryer et al., FAST 2012, read in sections 1 to 5.
  • recon14 is Fryer et al., FAST 2014, read in sections 1 to 3 and 5.
  • 31 invariants, 101 SQCK rules, 28 of 731 (3.8%), 8%, 15%, 64 MB and 128 MB come from recon12.
  • About 90% of native performance with noatime comes from recon14.
  • 2026-11-06: rechecked the updated 2012 paper, sections 2.4 and 4.1, and the 2014 paper, sections 2.2-3.2; added explicit fault-model limitations.
  • 2026-11-06: sections 3.2 and 4.3 bound the modified-ext3 prototype and data-flush exception.
  • 2026-11-07: FAST 2014 section 4.3.2 and Linux JBD2 Revocation Block distinguish reuse protection, supersession and the one-transaction model boundary.
  • 2026-11-13: visually checked updated FAST 2012 PDF Table 6; all 15 printed ratios agree to one decimal. Clarified setup-time versus throughput denominator; public recon-cost packet rechecks arithmetic, not a benchmark rerun.

JSON: /data/terms/filesystem-consistency-invariant.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Filesystem consistency invariant. Hesela. 2026-11-13. https://hesela.dev/terms/filesystem-consistency-invariant/