All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Behrens <sbehrens@giantdisaster.de>
To: Olivier Bonvalet <btrfs.list@daevel.fr>,
	Chris Samuel <chris@csamuel.org>,
	linux-btrfs@vger.kernel.org, David Sterba <dave@jikos.cz>
Subject: Re: kernel BUG at fs/btrfs/extent-tree.c:5038 (linux 3.4.7)
Date: Wed, 08 Aug 2012 18:06:51 +0200	[thread overview]
Message-ID: <50228E9B.8080300@giantdisaster.de> (raw)
In-Reply-To: <20120808144557.GW17430@twin.jikos.cz>

On Wed, 8 Aug 2012 16:45:57 +0200, David Sterba wrote:
> On Sun, Aug 05, 2012 at 04:11:47PM +0200, Olivier Bonvalet wrote:
>> Aug  5 16:10:12 backup2 kernel: [   58.674758] parent transid verify failed on 615015833600 wanted 110423 found 110424

1st mirror fails verify_parent_transid().

>> Aug  5 16:10:12 backup2 kernel: [   58.675090] parent transid verify failed on 615015833600 wanted 110423 found 110424

2nd mirror fails verify_parent_transid().

>> Aug  5 16:10:12 backup2 kernel: [   58.675523] btrfs read error corrected: ino 1 off 615015833600 (dev /dev/mapper/vg--backupplug-backup sector 1209083504)

That's a bug. It is wrong to ignore the previous results from
verify_parent_transid() and to call repair_eb_io_failure() which
rewrites one mirror and claims to have corrected an error. But it's not
a major issue, just a misleading message in the kernel log and a disk
write operation which does not repair anything.

> This looks strange, the the corrupted block belongs to metadata, I
> assume you have the DUP profile, so there is a good copy that can be
> used instead, the error message confirms that, but ...
> 
>> Aug  5 16:10:12 backup2 kernel: [   58.675536] Failed to read block groups: -5

That's correct, because the UPTODATE flag in the extent is not set
(verify_parent_transid() clears it when it detects an error).

> ... ? -5 means EIO, which is returned when a block cannot be read, so
> unless there's a different reason for it, this looks like a missed
> oportunity to fix an error and continue.
> 
> The same error messages are present in the logs from 3.4 version.
> 
>> Aug  5 16:10:12 backup2 kernel: [   58.704720] btrfs: open_ctree failed

The summary is that the block was not correctable, both mirrors had the
same old transid. The bug is that the call to repair_io_failure() should
not have been done because verify_parent_transid() indicated errors.

I'll prepare a patch for it. Changing btree_read_extent_buffer_pages()
to set ret to -EIO if verify_parent_transid() fails should fix the issue.

  reply	other threads:[~2012-08-08 16:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01 19:48 kernel BUG at fs/btrfs/extent-tree.c:5038 (linux 3.4.7) Olivier Bonvalet
2012-08-02 13:22 ` David Sterba
2012-08-02 13:41   ` Olivier Bonvalet
2012-08-02 13:53     ` David Sterba
2012-08-02 16:18       ` Olivier Bonvalet
2012-08-03 22:41         ` Olivier Bonvalet
2012-08-03 23:30           ` Olivier Bonvalet
2012-08-05  8:57           ` Chris Samuel
2012-08-05 14:11             ` Olivier Bonvalet
2012-08-08 14:45               ` David Sterba
2012-08-08 16:06                 ` Stefan Behrens [this message]
2012-08-27  8:49 ` Olivier Bonvalet

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=50228E9B.8080300@giantdisaster.de \
    --to=sbehrens@giantdisaster.de \
    --cc=btrfs.list@daevel.fr \
    --cc=chris@csamuel.org \
    --cc=dave@jikos.cz \
    --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.