linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tavian Barnes <tavianator@tavianator.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: linux-btrfs@vger.kernel.org, wqu@suse.com
Subject: Re: [PATCH] btrfs: tree-checker: dump the page status if hit something wrong
Date: Tue, 6 Feb 2024 16:53:54 -0500	[thread overview]
Message-ID: <CABg4E-=G4sL9KGjyNgFozUx2=jbe4+q_U+=eHv-cX_897HP8Ug@mail.gmail.com> (raw)
In-Reply-To: <CABg4E-=A+Ga2RtTW4tdJUhTQSNtg3HAvSYmGQaoPKJ-qh-UVJA@mail.gmail.com>

On Tue, Feb 6, 2024 at 4:48 PM Tavian Barnes <tavianator@tavianator.com> wrote:
> I just tried the tip of btrfs/for-next (6a1dc34172e0, "btrfs: move
> transaction abort to the error site btrfs_rebuild_free_space_tree()"),
> plus the dump_page() patch

By the way Qu, you should fold

@@ -2036,6 +2042,7 @@ int btrfs_check_eb_owner(const struct
extent_buffer *eb, u64 root_owner)
        if (!is_subvol) {
                /* For non-subvolume trees, the eb owner should match
root owner */
                if (unlikely(root_owner != eb_owner)) {
+                       dump_page(folio_page(eb->folios[0], 0), "eb page dump");
                        btrfs_crit(eb->fs_info,
 "corrupted %s, root=%llu block=%llu owner mismatch, have %llu expect %llu",
                                btrfs_header_level(eb) == 0 ? "leaf" : "node",
@@ -2051,6 +2058,7 @@ int btrfs_check_eb_owner(const struct
extent_buffer *eb, u64 root_owner)
         * to subvolume trees.
         */
        if (unlikely(is_subvol != is_fstree(eb_owner))) {
+               dump_page(folio_page(eb->folios[0], 0), "eb page dump");
                btrfs_crit(eb->fs_info,
 "corrupted %s, root=%llu block=%llu owner mismatch, have %llu expect
[%llu, %llu]",
                        btrfs_header_level(eb) == 0 ? "leaf" : "node",

into the patch.  Right now it's missing the dump_page() for the
relevant error message.

-- 
Tavian Barnes

  parent reply	other threads:[~2024-02-06 21:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 23:48 [PATCH] btrfs: tree-checker: dump the page status if hit something wrong Qu Wenruo
2024-02-06  3:38 ` tavianator
2024-02-06  5:54   ` Qu Wenruo
2024-02-06 20:12     ` Tavian Barnes
2024-02-06 20:39       ` Qu Wenruo
2024-02-06 21:48         ` Tavian Barnes
2024-02-06 21:53           ` Qu Wenruo
2024-02-13 18:07             ` Tavian Barnes
2024-02-13 18:26               ` Tavian Barnes
2024-02-13 21:26               ` Qu Wenruo
2024-02-06 21:53           ` Tavian Barnes [this message]
2024-02-06 22:01             ` Qu Wenruo
2024-02-06 12:51   ` David Sterba
2024-02-06 20:19     ` Tavian Barnes
2024-02-06 12:46 ` David Sterba
2024-02-06 20:34   ` 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='CABg4E-=G4sL9KGjyNgFozUx2=jbe4+q_U+=eHv-cX_897HP8Ug@mail.gmail.com' \
    --to=tavianator@tavianator.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    --cc=wqu@suse.com \
    /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).