Qu Wenruo <[email protected]> writes: >> I'm working on the fix. >> Please make sure there is no write into the fs (just in case, since the >> fs should be RO). > > Here it is: > https://github.com/adam900710/btrfs-progs/tree/dirty_fix_for_leonard_lausen > > You need to git checkout the branch, and then compile. > (No need to install) > > Then inside the directory, execute: > # ./btrfs-corrupt-block -X <device> > > It will try to locate the corrupted leaf using the dump-tree result. > If it doesn't find the corrupted leaf or the content isn't expected, it > will just exit without writing anything.
Thanks Qu for the quick fix! After running some BIOS system check to verify that there is no persistent hardware problem, your fix resolved the corruption issue. According to btrfs check there are no remaining issues and the system booted up fine. root@archiso ~/btrfs-progs (git)-[dirty_fix_for_leonard_lausen] # ./btrfs check -p --readonly /dev/mapper/vg1-root Opening filesystem to check... Checking filesystem on /dev/mapper/vg1-root UUID: ea519c2e-3571-46f8-905a-99c824327caa [1/7] checking root items (0:00:24 elapsed, 7398633 items checked) [2/7] checking extents (0:03:07 elapsed, 578278 items checked) [3/7] checking free space cache (0:00:13 elapsed, 814 items checked) [4/7] checking fs roots (0:07:07 elapsed, 464005 items checked) [5/7] checking csums (without verifying data) (0:00:19 elapsed, 1827711 items checked) [6/7] checking root refs (0:00:00 elapsed, 277 items checked) [7/7] checking quota groups skipped (not enabled on this FS) found 848209637510 bytes used, no error found total csum bytes: 785717792 total tree bytes: 9469886464 total fs tree bytes: 7635271680 total extent tree bytes: 848330752 btree space waste bytes: 1936310259 file data blocks allocated: 5230984867840 referenced 1031230742528 ./btrfs check -p --readonly /dev/mapper/vg1-root 374.85s user 45.16s system 62% cpu 11:11.17 total
