I read about ext4 checksums (), but I am not sure what they actually checksum. The name implies that only metadata is covered, not the actual data in the files? What kinds of errors can be detected?
01 Answer
I cannot see a real benefit to checksumming file data itself. It is an expensive operation on a block of data of unknown size and is duplicating effort that is done by the disk.
The checksumming here is providing filesystem level integrity checking, actual data on disk would rely on the disk internal checksums themselves. By checksumming metadata you protect the critical filesystem structures from software bugs and provide an extra layer of defence.
Essentially if data is corrupted in the filesystem checksumming data tells you what you can ignore or what you need to validate and recheck, there is little benefit (and potentially a big overhead) of checksumming large files when it is already done by the disk itself.
Actual file checksumming is also something that could easily be done by the application that wrote the data in the first place, archive formats do this and many applications will check data integrity to be sure they are not loading garbage. Doing it at the filesystem level as well as application and disk would be redundant and almost certainly unnecessary.
3