All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christoph Anton Mitterer <calestyo@scientia.org>,
	linux-btrfs@vger.kernel.org
Subject: Re: BTRFS error (device dm-0): parent transid verify failed on 1382301696 wanted 262166 found 22
Date: Mon, 28 Feb 2022 08:55:24 +0800	[thread overview]
Message-ID: <ff871fa3-901f-1c30-c579-2546299482da@gmx.com> (raw)
In-Reply-To: <f7270877b2f8503291d5517f22068a2f3829c959.camel@scientia.org>



On 2022/2/28 08:38, Christoph Anton Mitterer wrote:
> On Mon, 2022-02-28 at 07:26 +0800, Qu Wenruo wrote:
>> I checked the transid:
>>
>> hex(262166) = 0x40016
>> hex(22)     = 0x00016
>>
>> So definitely a bitflip.
>
> Hmm... would be a surprise, since I copy loads of data over that
> machine, which is always protected by some SHA512 sums.
> But could of course be possible.
>
> I assume you mean the bitflip would have happened when the data was
> written? Cause reading it reproducibly causes the same issue.

The corruption part is a tree block in checksum tree (ironically).

This corruption makes btrfs unable to read (part of) checksum tree, thus
unable to verify a lot of data.

>
> But shouldn't a scrub have noticed that?

Please note that, scrub only checks the checksum.

For memory bitflip, since it's corrupted in memory, the checksum will be
calculated using the corrupted data, thus the checksum for that tree
block will be correct, thus scrub won't detect it.

> That file was created around
> January 2019, and since then I've had mad several scrubs at least.
>
>
>> Please run memtest on the machine.
>
> Will do so later.
>
>
>
> Anyway... is it recommended to re-create the fs? Or is deleting the
> file enough, if a fsck+scrub finds nothing else.

The problem is not in the file data, but that checksum tree block.

Unfortunately there will be no good way to reset that bitflip using
btrfs-check.

It's possible to manually reset that generation and re-calculate the
csum to fix the fs.

But it needs to be done manually, as no tool has taken bitflip into
consideration.

Thanks,
Qu

>
>
> Thanks,
> Chris

  reply	other threads:[~2022-02-28  0:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-27 17:45 BTRFS error (device dm-0): parent transid verify failed on 1382301696 wanted 262166 found 22 Christoph Anton Mitterer
2022-02-27 23:26 ` Qu Wenruo
2022-02-28  0:38   ` Christoph Anton Mitterer
2022-02-28  0:55     ` Qu Wenruo [this message]
2022-02-28  5:19       ` Christoph Anton Mitterer
2022-02-28  6:54         ` Qu Wenruo
2022-02-28  5:32       ` Christoph Anton Mitterer
2022-02-28  6:48         ` Qu Wenruo
2022-02-28 15:24           ` Christoph Anton Mitterer
2022-03-01  0:19             ` Qu Wenruo
2022-03-01  2:14               ` Christoph Anton Mitterer
2022-03-01  2:30                 ` Qu Wenruo
2022-03-02  1:38                   ` Christoph Anton Mitterer
2022-03-02  2:01                     ` Qu Wenruo

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=ff871fa3-901f-1c30-c579-2546299482da@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=calestyo@scientia.org \
    --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.