mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-11 03:31:17 +00:00
There are at least two bug reports of kernel tree-checker complaining about invalid inode generation. All offending inodes seem to be caused by old kernel around 2014, with inode generation overflow. So add such check and repair ability to lowmem mode check first. This involves: - Calculate the inode generation upper limit Unlike the lowmem mode context, we don't have anyway to determine if this inode belongs to log tree. So we use super_generation + 1 as upper limit, just like what we did in kernel tree checker. - Check if the inode generation is larger than the upper limit - Repair by resetting inode generation to current transaction generation The difference is, in original mode, we have a common trans handle for all repair and reset path for each repair. Reported-by: Charles Wright <charles.v.wright@gmail.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Tested-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> |
||
---|---|---|
.. | ||
common.h | ||
main.c | ||
mode-common.c | ||
mode-common.h | ||
mode-lowmem.c | ||
mode-lowmem.h | ||
mode-original.h | ||
qgroup-verify.c | ||
qgroup-verify.h |