forked from Mirrors/btrfs-progs
9b01db7785
[BUG] Even "btrfs rescue zero-log" only reset btrfs_super_block::log_root and btrfs_super_block::log_root_level, we still use trasction to write all super blocks for all devices. This means we can't handle things like corrupted extent tree: checksum verify failed on 2172747776 found 000000B6 wanted 00000000 checksum verify failed on 2172747776 found 000000B6 wanted 00000000 bad tree block 2172747776, bytenr mismatch, want=2172747776, have=0 WARNING: could not setup extent tree, skipping it Clearing log on /dev/nvme/btrfs, previous log_root 0, level 0 ERROR: Corrupted fs, no valid METADATA block group found ERROR: attempt to start transaction over already running one [CAUSE] Because we have extra check in transaction code to ensure we have valid METADATA block groups. In fact we don't really need transaction at all. [FIX] Instead of commit transaction, we can just call write_all_supers() manually, so we can still handle multi-device fs while avoid above error. Also, add OPEN_CTREE_NO_BLOCK_GROUPS open ctree flag to make it more robust. Link: https://lore.kernel.org/linux-btrfs/CAKbQEqG35D_=8raTFH75-yCYoqH2OvpPEmpj2dxgo+PTc=cfhA@mail.gmail.com/ Reported-by: Christian Pernegger <pernegger@gmail.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> |
||
---|---|---|
.. | ||
balance.c | ||
commands.h | ||
device.c | ||
filesystem-du.c | ||
filesystem-usage.c | ||
filesystem-usage.h | ||
filesystem.c | ||
inspect-dump-super.c | ||
inspect-dump-tree.c | ||
inspect-tree-stats.c | ||
inspect.c | ||
property.c | ||
qgroup.c | ||
quota.c | ||
receive.c | ||
replace.c | ||
rescue-chunk-recover.c | ||
rescue-super-recover.c | ||
rescue.c | ||
rescue.h | ||
restore.c | ||
scrub.c | ||
send.c | ||
subvolume.c |