All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Leonard Lausen <leonard@lausen.nl>,
	linux-btrfs@vger.kernel.org
Subject: Re: BTRFS critical corrupt leaf bad key order
Date: Tue, 15 Jan 2019 20:22:36 +0800	[thread overview]
Message-ID: <338c02b6-4cbd-87fb-88ea-8165b41b9208@gmx.com> (raw)
In-Reply-To: <20190115120359.GG2900@twin.jikos.cz>


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



On 2019/1/15 下午8:03, David Sterba wrote:
> On Tue, Jan 15, 2019 at 07:48:47PM +0800, Qu Wenruo wrote:
>> Super nice move, it shows the corruption and the cause.
>>
>> 	item 66 key (1714119835648 METADATA_ITEM 0) itemoff 13325 itemsize 33
>> 	item 67 key (10510212874240 METADATA_ITEM 0) itemoff 13283 itemsize 42
>> 	item 68 key (1714119868416 METADATA_ITEM 0) itemoff 13250 itemsize 33
> 
> The key order is the most frequent and also very reliable report of the
> memory bitlips. I think we should add an unconditional check before a
> leaf or node is written so we catch such errors before the bad data hit
> the disk.

I'm super happy for that.
Although I need to do some extra check before just removing that #ifdef
#endif pair.

> 
> This seems to happen way too often,

Right, but I don't know if it's some bad kernel driver poking the
memory, or really just some hardware memory flip.
(Especially when it comes to ultrabook like the reporter is using,
soldered memory will really be a pain in ass)

> I believe the check overhead would
> be acceptable and at least give early warning.

The problem is, current check_leaf_relaxed() call is too frequently.
It's not at leaf write time, but every time btrfs_mark_buffer_dirty().

It may cause some performance regression.

I need to look into a better location for such check.

Thanks,
Qu


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

  reply	other threads:[~2019-01-15 12:22 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 [this message]
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

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=338c02b6-4cbd-87fb-88ea-8165b41b9208@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.cz \
    --cc=leonard@lausen.nl \
    --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.