File System Consistency (cont.)
FSCK process in Unix (cont.):
- Compare Files and inodes. The count in the inode needs to be equal to the number of directory entries that point to it. If not:
- If count in inode is smaller - increase count and we might have a problem.
- If count in inode is larger - decrease count.
- More checks can be added in principle.
Some file systems operate similarly to database systems (with logs etc.) so that they will not enter such cases. What is the cost?