From: Dhruva G <goledhruva@gmail.com>
To: Qu Wenruo <wqu@suse.com>,
linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Cc: ebiggers@kernel.org
Subject: Re: [PATCH v4] fstests: generic: add a test case to check fsverity reads
Date: Sun, 25 Oct 2026 20:58:25 +0530 [thread overview]
Message-ID: <17693fe3-9b88-4efc-a8ad-3804fa675a7e@gmail.com> (raw)
In-Reply-To: <20261017090341.72079-1-wqu@suse.com>
On 17-10-2026 14:33, 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 and verify its content
>
> - Verify there is no "FILE CORRUPTED!" warning
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> Changelog
> v4:
> - Also output the checksum for the file for content verification
>
> - Update the comment to show the requirement more clearly
> It requires the folio size larger than the fs block size.
>
> This means either a system with larger page size (e.g. 64K page sized
> arm64 with 4K block size), or large folio support (which requires
> transparent huge page).
>
> - Minor comment updates
> * Concentrate the mention of large folio to the triggering part
> * Explain why fserror is not utilized for error detection
For this version too,
Reviewed-by: Dhruva Gole <goledhruva@gmail.com>
Tested-by: Dhruva Gole <goledhruva@gmail.com>
prev parent reply other threads:[~2026-10-25 15:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 9:03 [PATCH v4] fstests: generic: add a test case to check fsverity reads Qu Wenruo
2026-10-17 12:40 ` Eric Biggers
2026-10-25 15:28 ` 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=17693fe3-9b88-4efc-a8ad-3804fa675a7e@gmail.com \
--to=goledhruva@gmail.com \
--cc=ebiggers@kernel.org \
--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.