All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Zorro Lang <zlang@kernel.org>,
	fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 03/13] xfs: add a XFS_VERIFY_FILE_DATA variable
Date: Mon, 28 Sep 2026 18:34:21 -0700	[thread overview]
Message-ID: <20260929013421.GF2705364@frogsfrogsfrogs> (raw)
In-Reply-To: <20260924100855.2734089-4-hch@lst.de>

On Thu, Sep 24, 2026 at 12:07:44PM +0200, Christoph Hellwig wrote:
> Add an option to run the end of testt xfs_scrub call using the -x

                                  test

> option to also check file data validity.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  README     | 3 +++
>  common/xfs | 8 +++++++-
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/README b/README
> index cc03f51e1ad3..0ce7d4463354 100644
> --- a/README
> +++ b/README
> @@ -326,6 +326,9 @@ Extra XFS specification:
>   - xfs_scrub, if present, will always check the test and scratch
>     filesystems if they are still online at the end of the test. It is no
>     longer necessary to set TEST_XFS_SCRUB.
> + - Set XFS_VERIFY_FILE_DATA option to also check file data integrity using the
> +   -x option to xfs_scrub.  This makes the xfs_scrub based checks a lot slower,
> +   but verifies the data checksum support in XFS.
>  
>  Tools specification:
>   - dump:
> diff --git a/common/xfs b/common/xfs
> index 98981e624dda..8254e48603af 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -875,6 +875,12 @@ _check_xfs_filesystem()
>  	# Run online scrub if we can.
>  	mntpt="$(_is_dev_mounted $device)"
>  	if [ -n "$mntpt" ] && _supports_xfs_scrub "$mntpt" "$device"; then
> +		local xfs_scrub_opts="-v -d -n"
> +
> +		if [ -n "$XFS_VERIFY_FILE_DATA" ]; then
> +			xfs_scrub_opts="$xfs_scrub_opts -x"
> +		fi

/me wonders if you should use bash arrays here but seeing as we just got
burned by that I'll defer to Zorro if he prefers that or not.

With the typo fixed, this looks ok to me.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> +
>  		can_scrub=1
>  
>  		# Tests can create a scenario in which a call to syncfs() issued
> @@ -888,7 +894,7 @@ _check_xfs_filesystem()
>  		# before executing a scrub operation.
>  		$XFS_IO_PROG -c syncfs $mntpt >> $seqres.full 2>&1
>  
> -		"$XFS_SCRUB_PROG" -v -d -n $mntpt > $tmp.scrub 2>&1
> +		"$XFS_SCRUB_PROG" $xfs_scrub_opts $mntpt > $tmp.scrub 2>&1
>  		if [ $? -ne 0 ]; then
>  			_log_err "_check_xfs_filesystem: filesystem on $device failed scrub"
>  			echo "*** xfs_scrub -v -d -n output ***" >> $seqres.full
> -- 
> 2.53.0
> 
> 

  reply	other threads:[~2026-09-29  1:34 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 10:07 xfstests support for RT data checksums Christoph Hellwig
2026-09-24 10:07 ` [PATCH 01/13] add a "datacsum" group Christoph Hellwig
2026-09-29  1:31   ` Darrick J. Wong
2026-10-05 13:17     ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 02/13] common: add a SCRATCH_MKFS_OPTIONS variable Christoph Hellwig
2026-09-29  1:32   ` Darrick J. Wong
2026-10-05 13:18     ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 03/13] xfs: add a XFS_VERIFY_FILE_DATA variable Christoph Hellwig
2026-09-29  1:34   ` Darrick J. Wong [this message]
2026-09-24 10:07 ` [PATCH 04/13] xfs/206: filter out csum information from mkfs output Christoph Hellwig
2026-09-29  1:34   ` Darrick J. Wong
2026-09-24 10:07 ` [PATCH 05/13] xfs: add a _require_xfs_data_csum helper Christoph Hellwig
2026-09-29  1:38   ` Darrick J. Wong
2026-10-05 13:20     ` Christoph Hellwig
2026-10-05 14:48       ` Darrick J. Wong
2026-10-05 14:55         ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 06/13] xfs/2301: test lazy bounce buffering mode Christoph Hellwig
2026-09-29  1:42   ` Darrick J. Wong
2026-10-05 13:21     ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 07/13] xfs/2302: add a basic data checksum test Christoph Hellwig
2026-09-29  1:48   ` Darrick J. Wong
2026-10-05 13:22     ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 08/13] xfs/2303: test that data checksums detect data misplacement Christoph Hellwig
2026-09-29  1:54   ` Darrick J. Wong
2026-10-05 13:23     ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 09/13] xfs/2304: version of generic/388 that run xfs_scrub -x for each iteration Christoph Hellwig
2026-09-29  1:56   ` Darrick J. Wong
2026-10-05 13:25     ` Christoph Hellwig
2026-10-05 14:51       ` Darrick J. Wong
2026-10-05 14:56         ` Christoph Hellwig
2026-10-05 15:20           ` Darrick J. Wong
2026-10-07 13:42             ` Christoph Hellwig
2026-10-07 15:19               ` Darrick J. Wong
2026-09-24 10:07 ` [PATCH 10/13] xfs/2305: version of generic/475 " Christoph Hellwig
2026-09-29  1:57   ` Darrick J. Wong
2026-10-05 13:25     ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 11/13] xfs/2306: test mkfs input validation for RT data csum options Christoph Hellwig
2026-09-29  1:59   ` Darrick J. Wong
2026-10-05 13:26     ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 12/13] xfs/2307: test checksum handling using corrupted checksums Christoph Hellwig
2026-09-29  2:05   ` Darrick J. Wong
2026-10-05 13:27     ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 13/13] xfs/2308: test rebuilding of csum files in xfs_repair Christoph Hellwig
2026-09-29  2:03   ` Darrick J. Wong
2026-10-05 13:27     ` Christoph Hellwig

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=20260929013421.GF2705364@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@kernel.org \
    /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.