The tests were using dumpe2fs/debugfs -R "stats" (same thing) to get information about the superblock to use for tests. Mostly that works, except for lifetime writes. That is rounded to MB, which makes it difficult to get the correct number, and sometimes is wrong, which makes the 2 bytes in the calculation incorrect, and makes the checksum wrong.
This instead reads the specific bytes from the superblock via dd and uses that as the accurate number.
The tests were using
dumpe2fs
/debugfs -R "stats"
(same thing) to get information about the superblock to use for tests. Mostly that works, except for lifetime writes. That is rounded to MB, which makes it difficult to get the correct number, and sometimes is wrong, which makes the 2 bytes in the calculation incorrect, and makes the checksum wrong.This instead reads the specific bytes from the superblock via
dd
and uses that as the accurate number.