linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christoph Anton Mitterer <calestyo@gmail.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Fwd: Re: BUG: unable to handle kernel paging request at ffff9fb75f827100
Date: Wed, 28 Feb 2018 16:36:12 +0800	[thread overview]
Message-ID: <c88d6721-ad20-c45d-0ac1-a49f2bab66cb@gmx.com> (raw)
In-Reply-To: <8DB99A3B-6238-497D-A70F-8834CC014DCF@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2843 bytes --]

Hi Christoph,

Since I'm still digging the unexpected corruption (although without much
progress yet), would you please describe how the corruption happens?

In my current investigation, btrfs is indeed bullet-proof, (unlike my
original assumption) using newer dm-log-writes tool.

But free space cache file (v1 free space cache) is not CoW protected so
it's vulnerable against power loss.

So my current assumption is, there are at least 2 power loss happens
during the problem.

The 1st power loss caused free space cache corrupted but not detected by
its checksum, and btrfs used the corrupted free space cache to allocate
tree blocks.

And then 2nd power loss happened. Since new allocated tree blocks can
overwrite existing tree blocks, it breaks metadata CoW of btrfs, and
leads the final corruption.

Would you please provide some detailed info about the corruption?

Thanks,
Qu

On 2018年02月23日 03:21, Christoph Anton Mitterer wrote:
> Am 22. Februar 2018 04:57:53 MEZ schrieb Qu Wenruo <quwenruo.btrfs@gmx.com>:
>>
>>
>> On 2018年02月22日 10:56, Christoph Anton Mitterer wrote:
>>> Just one last for today... I did a quick run with the byte nr from
>> the last mail... See screenshot
>>>
>>> It still gives these mapping errors... But does seem to write
>> files...
>>
>>From your previous picture, it seems that FS_TREE is your primary
>> subvolume, and 257 would be your snapshot.
>>
>> And for that block which can't be mapped, it seems to be a corruption
>> and it's really too large.
>>
>> So ignoring it wouldn't be a problem.
>>
>> And just keep btrfs-store running to see what it salvaged?
>>
>>>
>>> But these mapping errors... Wtf?! 
>>>
>>>
>>> Thanks and until tomorrow.
>>>
>>> Chris
>>>
>>> Oh and in my panic (I still fear that my main data fs, which is on
>> other hard disks could be affected by that strange bug, too, and have
>> no idea how to verify they are not) I forgot: you are from China,
>> aren't you? So a blessed happy new year. :-)
>>
>> Happy new year too.
>>
>> Thanks,
>> Qu
>>
>>>
> 
> Hey
> 
> Have you written more after the mail below?  Cause my normal email account ran full and I cannot recover that right now with my computer.
> 
> Anyway... I tried now the restore and it seems to give back some data (haven't looked at it yet)... I also made a dd copy of the whole fs image to another freshly crafted btrfs fs (as an image file).
> 
> That seemed to work well, but when I differs that image with the original, new csum errors of that file were found. (see attached image)
> 
> Could that be a pointer to some hardware defect? Perhaps the memory? Though I did do an extensive memtest86+ a while ago.
> 
> And that could be the reason for the corruption in the first place...
> 
> Thanks,
> Chris.
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 520 bytes --]

       reply	other threads:[~2018-02-28  8:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <26306A4D-2D8E-4661-B89E-9F050FD184D5@scientia.net>
     [not found] ` <BF03A3DF-684D-47FE-A9AD-320256F64763@scientia.net>
     [not found]   ` <b6b4ed0e-9569-158d-19ad-82c885bab4ec@gmx.com>
     [not found]     ` <BB977A40-847C-4611-A468-9BF1137CE711@scientia.net>
     [not found]       ` <d2a14d69-dfa9-8794-6375-03d1b209632f@gmx.com>
     [not found]         ` <68697875-6E77-49C4-B54E-0FADB94700DA@scientia.net>
     [not found]           ` <99ee9b31-a38a-d479-5b1d-30e9c942d577@gmx.com>
     [not found]             ` <A19E863A-F83C-4630-9675-4309CECB318E@scientia.net>
     [not found]               ` <1b24e69e-2c1e-71af-fb1d-9d32f72cc78c@gmx.com>
     [not found]                 ` <8DB99A3B-6238-497D-A70F-8834CC014DCF@gmail.com>
2018-02-28  8:36                   ` Qu Wenruo [this message]
     [not found]                     ` <1519833022.3714.122.camel@scientia.net>
2018-03-01  1:25                       ` spurious full btrfs corruption Qu Wenruo
2018-03-06  0:57                         ` Christoph Anton Mitterer
2018-03-06  1:50                           ` Qu Wenruo
2018-03-08 14:38                             ` Christoph Anton Mitterer
2018-03-08 23:48                               ` Qu Wenruo
2018-03-16  0:03                                 ` Christoph Anton Mitterer
2018-03-21 22:03                                   ` Christoph Anton Mitterer
2018-03-26 14:32                                   ` Christoph Anton Mitterer
2018-03-07  3:09                           ` Duncan

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=c88d6721-ad20-c45d-0ac1-a49f2bab66cb@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=calestyo@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).