mirror of
https://github.com/nilfs-dev/nilfs-utils.git
synced 2026-01-26 13:43:15 +00:00
On-disk summary information of files can fall into inconsistent states in theory: - The block count recorded in finfo can exceed the number of remaining payload blocks. - The number of data blocks recorded in finfo can be larger than the number of total blocks of the file, or - The total size of finfo and binfo structures can exceed the size of summary information of the partial segment. This adds sanity checks for these glitches to nilfs_file, and adds a framework to handle these errors as well. Also, this enhances the error output routine of dumpseg command to handle these errors nicely. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>