File-system consistency checker (source code)

= File-system consistency checker

A program that compares independently represented facts in a <file system>, such as the <hard link> counts in <inodes> versus references found in <directory entries>, or the <block allocation bitmap> versus block ownership recovered from <inodes> and reserved structures. Disagreement detects corruption; repair policies must decide which evidence to trust and preserve recoverable data. A scan of names alone is insufficient to infer live ownership while the <file system> is changing or has unnamed open <files>, so checking requires a suitable stable view.