Crash Consistency

fsck

Superblock: Sanity Check:

  1. Check the system size > the number of blocks that have been allocated.
  2. We want to find a suspected superblock.

Free Blocks:

Ensure inodes in use ar emorked in inode bitmaps. Update the inode bitmap if needed.

Inode state: check inode fields for possible corruption

Like check a vaild mode field.

Duplicates: check if two different inodes refer to same block.

Clear One if obviously bad, or give each inode its own copy of block

Bad blocks: bad pointers (like outside of valid range)

Remove.

Directory checks: Integrity of directory structure

Such as, . and .. must be the first two entries

Journalling

Transaction structure

Leave a Reply