mirror of
https://github.com/nilfs-dev/nilfs-utils.git
synced 2026-01-26 13:43:15 +00:00
If ss_bytes, an on-disk segment summary data, stores a value that is not a multiple of eight, memory access for reading file/block information can cause a bad alignment exception depending on the architecture. To prevent the issue, this introduces an error handling framework to the psegment iterator, inserts a sanity check in nilfs_psegment_is_valid() function that detects the bad alignment condition and reports it with the framework, and applies these changes to dumpseg command and gc library. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>