From: Eric Biggers <ebiggers@kernel.org>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH] fstests: btrfs: add a test case to verify fsverity on compressed files
Date: Sat, 10 Oct 2026 10:02:03 +0200 [thread overview]
Message-ID: <20261010080203.GB1946@quark> (raw)
In-Reply-To: <20261010032508.36935-1-wqu@suse.com>
On Sat, Oct 10, 2026 at 01:55:08PM +1030, Qu Wenruo wrote:
> There is a bug report that with the recently enabled large folios
> support, compressed files on btrfs can give random but reproducible
> warnings about file corruption.
>
> It turns out to be a bug in the verification range, where blocks not
> included in the read range are passed to be verified.
>
> Add a new regression test case for it, the workload is pretty simple:
>
> - Create a 64M file with compressed file extents
> - Enable fsverity digest on that file
> - Drop page cache
> - Read that file
> - Verify there is no "FILE CORRUPTED!" warning
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> tests/btrfs/359 | 45 +++++++++++++++++++++++++++++++++++++++++++++
> tests/btrfs/359.out | 6 ++++++
> 2 files changed, 51 insertions(+)
> create mode 100755 tests/btrfs/359
> create mode 100644 tests/btrfs/359.out
>
> diff --git a/tests/btrfs/359 b/tests/btrfs/359
> new file mode 100755
> index 00000000..2047d965
> --- /dev/null
> +++ b/tests/btrfs/359
> @@ -0,0 +1,45 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2026 SUSE S.A. All Rights Reserved.
> +#
> +# FS QA Test 359
> +#
> +# Test if btrfs handles fsverity read correctly without corruption warning
> +#
> +. ./common/preamble
> +_begin_fstest auto quick verity compress
> +
> +_fixed_by_kernel_commit xxxxxxxxxxxx \
> + "btrfs: fix the fsverity callback where unexpected range is verified"
> +
> +. ./common/filter
> +. ./common/verity
> +
> +_require_scratch_verity
Missing _require_check_dmesg?
Also, sourcing common/verity adds nodatasum to the mount options.
Doesn't that disable compression too?
- Eric
next prev parent reply other threads:[~2026-10-10 8:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-10 3:25 [PATCH] fstests: btrfs: add a test case to verify fsverity on compressed files Qu Wenruo
2026-10-10 8:02 ` Eric Biggers [this message]
2026-10-10 8:13 ` 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=20261010080203.GB1946@quark \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox