Each phase compares components and checks that
these components agree with each other.
fsck reads the map of filesystem inodes
(inode bitmap) and initializes the map of filesystem blocks
fsck reads the inodes and validates them.
DTFS files are managed through a structure known as
a ``B+ tree''.
The tree consists of disk block addresses that point either to
intermediate blocks (known as ``interior nodes'') or to
the actual user data blocks (referred to as ``leaf nodes'').
This tree structure is normally balanced (the distance from top
level to leaf is the same for all paths in the tree). fsck
verifies the parent inodes and rebalances any inodes (trees) that
have become unbalanced.
fsck rebuilds the directory hierarchy.
Because DTFS inodes contain the
inode number of the parent directory and the inode filename,
reconstruction is much easier and requires no lost+found directory.
If any inodes that cannot be reconnected or contain
invalid data (bad inodes) are found, the inode bitmap is updated.
The block bitmap is then updated.
fsck updates information in the superblock.
For a complete list of error messages, see the