From: Dhruva G <goledhruva@gmail.com>
To: Qu Wenruo <wqu@suse.com>,
linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH v3] fstests: generic: add a test case to check fsverity reads
Date: Mon, 12 Oct 2026 22:02:57 +0530 [thread overview]
Message-ID: <75e589b7-9a03-4f23-938e-e1b9ce5bf01e@gmail.com> (raw)
In-Reply-To: <20261011222613.10793-1-wqu@suse.com>
On 12-10-2026 03:56, Qu Wenruo wrote:
> There is a bug report that with the recently enabled large folios
> support, fsverity enabled files on btrfs can trigger reproducible
> warnings about file corruption, but in the end no error is returned to
> user space.
>
> It turns out to be a bug in the btrfs fsverity integration, where blocks
> not included in the read range are passed to be verified.
>
> This is a long-standing bug where btrfs fsverity always assumed that one
> folio contains exactly one fs block, ignoring the fact that btrfs had
> block size < page size support before fsverity support was added.
>
> Add a new regression test case for it. The workload is pretty simple:
>
> - Create a 32M file
>
> - Punch a 64K hole for every 128K
> This will limit the read bio size to 64K, which is smaller than
> a lot of large folios, and thus can trigger the btrfs bug.
>
> - Enable fsverity digest and drop page cache
>
> - Read that file
>
> - Verify there is no "FILE CORRUPTED!" warning
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> Changelog
> v3:
> - Disable signature verification temporarily for the test
> Pointed out by Dhruva, as it's a user configurable behavior that if
> signature is required, reading the file without a signature will lead
> to an EPERM error.
Thanks, looks good.
Tested-by: Dhruva Gole <goledhruva@gmail.com>
Reviewed-by: Dhruva Gole <goledhruva@gmail.com>
Regards,
Dhruva
prev parent reply other threads:[~2026-10-12 16:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 22:26 [PATCH v3] fstests: generic: add a test case to check fsverity reads Qu Wenruo
2026-10-12 12:33 ` Christoph Hellwig
2026-10-12 16:32 ` Dhruva G [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=75e589b7-9a03-4f23-938e-e1b9ce5bf01e@gmail.com \
--to=goledhruva@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--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 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.