From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Leo Martins <loemra.dev@gmail.com>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] btrfs-progs: check: recognize verity item keys in original mode
Date: Wed, 25 Mar 2026 09:19:58 +1030 [thread overview]
Message-ID: <60ecd7cd-2fc2-439b-86a8-bc3a2ae8364d@gmx.com> (raw)
In-Reply-To: <77723ae3c51bb05723123a15b869cdee921727e2.1774378180.git.loemra.dev@gmail.com>
在 2026/3/25 05:22, Leo Martins 写道:
> Commit 4e88bb6e ("btrfs-progs: enhance detection on unknown inode keys")
> added stricter validation for inode keys in the original mode checker,
> flagging unknown key types as errors. However, it did not add cases for
> BTRFS_VERITY_DESC_ITEM_KEY (36) and BTRFS_VERITY_MERKLE_ITEM_KEY (37),
> causing any filesystem with fs-verity enabled files to fail the check
> with:
>
> ERROR: unknown key (257 36 0) found in leaf 30621696
>
> Add the missing switch cases so that verity metadata items are
> recognized and silently skipped during the check, matching the behavior
> of lowmem mode which already handles them.
Unfortunately I noticed that, lowmem mode doesn't have such handling either.
As I created a test case with verity items, and CI failed due to false
alerts from CI.
I'll send out a small fix for the lowmem mode, along with the test case.
Thanks,
Qu
>
> Signed-off-by: Leo Martins <loemra.dev@gmail.com>
> ---
> check/main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/check/main.c b/check/main.c
> index c96969fd..4fdd8867 100644
> --- a/check/main.c
> +++ b/check/main.c
> @@ -1895,6 +1895,9 @@ static int process_one_leaf(struct btrfs_root *root, struct extent_buffer *eb,
> case BTRFS_XATTR_ITEM_KEY:
> ret = process_xattr_item(eb, i, &key, active_node);
> break;
> + case BTRFS_VERITY_DESC_ITEM_KEY:
> + case BTRFS_VERITY_MERKLE_ITEM_KEY:
> + break;
> default:
> error("unknown key (%llu %u %llu) found in leaf %llu",
> key.objectid, key.type, key.offset, eb->start);
prev parent reply other threads:[~2026-03-24 22:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 18:52 [PATCH] btrfs-progs: check: recognize verity item keys in original mode Leo Martins
2026-03-24 21:05 ` Qu Wenruo
2026-03-24 22:49 ` Qu Wenruo
2026-03-24 23:05 ` Leo Martins
2026-03-24 22:49 ` Qu Wenruo [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=60ecd7cd-2fc2-439b-86a8-bc3a2ae8364d@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=loemra.dev@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