simoop: rework the verification code
This makes a few changes to simoop's verifier and general IO patterns.
First we have a few new options:
-v -- verify files immediately after writing them
-I -- ignore crcs completely
-e -- truncate all files to zero length on startup
We're now using sync_file_range to force file writes down to disk and
fadvise to drop caches before reads.
Header checks output more information about which offsets in the file
were corrupted, and also verify the inode number in the file matches the
inode number we expect. I'll have to rework this if we start exercising
reflink'd extents but for now it helps detect misplaced writes.
All of these changes make simoop more useful for finding memory
corruptions and file data corruptions.
Signed-off-by: Chris Mason <firstname.lastname@example.org>
1 file changed