From: Leonard Lausen <leonard@lausen.nl>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, linux-btrfs@vger.kernel.org
Subject: Re: BTRFS critical corrupt leaf bad key order
Date: Tue, 15 Jan 2019 15:17:03 +0000 [thread overview]
Message-ID: <87sgxurlw0.fsf@lausen.nl> (raw)
In-Reply-To: <3a74079a-7e13-9368-93fb-0c25a10450e0@gmx.com>
Qu Wenruo <quwenruo.btrfs@gmx.com> 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
prev parent reply other threads:[~2019-01-15 15:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 11:28 BTRFS critical corrupt leaf bad key order Leonard Lausen
2019-01-15 11:48 ` Qu Wenruo
2019-01-15 11:51 ` David Sterba
2019-01-15 12:17 ` Qu Wenruo
2019-01-15 12:03 ` David Sterba
2019-01-15 12:22 ` Qu Wenruo
2019-01-15 12:28 ` Leonard Lausen
2019-01-15 12:31 ` Qu Wenruo
2019-01-16 1:38 ` Chris Murphy
2019-01-16 1:52 ` Qu Wenruo
2019-01-15 12:27 ` Qu Wenruo
2019-01-15 15:17 ` Leonard Lausen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgxurlw0.fsf@lausen.nl \
--to=leonard@lausen.nl \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox