From: ZhengYuan Huang <gality369@gmail.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: dsterba@suse.com, clm@fb.com, wqu@suse.com,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
baijiaju1990@gmail.com, r33s3n6@gmail.com, zzzccc427@gmail.com,
stable@vger.kernel.org
Subject: Re: [PATCH] btrfs: reject root items with drop_progress and zero drop_level
Date: Thu, 12 Mar 2026 08:02:47 +0800 [thread overview]
Message-ID: <CAOmEq9WDrM=0_KbFohSxgrpMxuin8hNaro9YsY8HgVASOf4KaA@mail.gmail.com> (raw)
In-Reply-To: <849ac4be-b10d-4eb7-892f-4b9ee2ef5cb2@gmx.com>
On Thu, Mar 12, 2026 at 5:08 AM Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
> > [FIX]
> > Fix this by validating the root_item invariant in tree-checker when
> > reading root items from disk: if drop_progress.objectid is non-zero,
> > drop_level must also be non-zero. Reject such malformed metadata with
> > -EUCLEAN before it reaches merge_reloc_root() or btrfs_drop_snapshot()
> > and triggers the BUG_ON.
> >
> > Also fix the related tree-checker error message to report
> > "invalid root drop_level" instead of the misleading "invalid root level".
>
> The only "fix" part I can see is the fix of the message from drop_level.
>
> If you really want to do that, please send out a fix dedicated for that
> single line.
>
> Otherwise you're adding a new check. Please do not mix fix and new check
> into one patch.
Thanks for the feedback.
I'll split the message fix and the new validation check into separate
patches and resend them.
Thanks,
ZhengYuan Huang
prev parent reply other threads:[~2026-03-12 0:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 11:16 [PATCH] btrfs: reject root items with drop_progress and zero drop_level ZhengYuan Huang
2026-03-11 21:08 ` Qu Wenruo
2026-03-12 0:02 ` ZhengYuan Huang [this message]
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='CAOmEq9WDrM=0_KbFohSxgrpMxuin8hNaro9YsY8HgVASOf4KaA@mail.gmail.com' \
--to=gality369@gmail.com \
--cc=baijiaju1990@gmail.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=r33s3n6@gmail.com \
--cc=stable@vger.kernel.org \
--cc=wqu@suse.com \
--cc=zzzccc427@gmail.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