From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Duncan <1i5t5.duncan@cox.net>, <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs check segfaults after flipping 2 Bytes
Date: Mon, 6 Oct 2014 12:13:23 +0800 [thread overview]
Message-ID: <543216E3.9020702@cn.fujitsu.com> (raw)
In-Reply-To: <pan$37fbc$985496aa$c0a58ffc$edacda92@cox.net>
-------- Original Message --------
Subject: Re: btrfs check segfaults after flipping 2 Bytes
From: Duncan <1i5t5.duncan@cox.net>
To: <linux-btrfs@vger.kernel.org>
Date: 2014年10月06日 12:10
> Qu Wenruo posted on Mon, 06 Oct 2014 10:29:53 +0800 as excerpted:
>
>> 2 problems here.
>>
>> [1] csum mismatch As already mentioned by Ducan and Brendan, the csum
>> does not match.
>>
>> What makes thing much worse, since small file's extent is inlined, the
>> data is stored in metadata tree blocks,
>> and the file system is almost empty so the inline extent lies in the
>> *root* leaf of fs_tree.
>> These two unfortunate facts makes the whole fs_tree corrupted(only one
>> leaf, and its cusm dismatch),
>> which cause btrfs-progs segfault.
> So I nailed it. =:^)
>
>> The good news is that, the bug in btrfs-progs is already fixed by Wang's
>> patch:
>> https://patchwork.kernel.org/patch/4254631/
>> So at least, btrfs-progs will not segfault anymore.
>>
>> [2] two occurences?
>> So you definitely changed something you should not touch... maybe
>> another tree root?
> 1) Single device btrfs, therefore...
> 2) DUP metadata by default.
Oh, I forgot this, default DUP for metadata...
Thanks
Qu.
>
> 3) Small file, therefore...
> 4) Inlined in (DUP) metadata, therefore...
>
> 5) Two occurrences, each a copy of the (metadata-inlined) file in its own
> instance of the (duped) metadata block.
>
> I nailed it again. =:^)
>
> But the connection between the mentioned tree root patch and this
> particular bug had escaped me, so that's useful new information to me
> too, resolving the problem that I spotted but had no clue whether it was
> even fixable. Thanks. =:^)
>
prev parent reply other threads:[~2014-10-06 4:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 20:29 btrfs check segfaults after flipping 2 Bytes Niklas Fischer
2014-10-01 20:34 ` Niklas Fischer
2014-10-01 23:31 ` Duncan
2014-10-02 5:51 ` Brendan Hide
2014-10-02 10:58 ` Duncan
2014-10-02 18:38 ` Brendan Hide
2014-10-06 2:29 ` Qu Wenruo
2014-10-06 4:10 ` Duncan
2014-10-06 4:13 ` Qu Wenruo [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=543216E3.9020702@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.