public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: "Luis Henriques (SUSE)" <luis.henriques@linux.dev>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH v2 1/2] common/fuzzy: make _scratch_fuzz_modify work for non-xfs filesystems
Date: Tue, 19 Mar 2024 18:20:42 -0700	[thread overview]
Message-ID: <20240320012042.GM6188@frogsfrogsfrogs> (raw)
In-Reply-To: <20240315171325.2885-2-luis.henriques@linux.dev>

On Fri, Mar 15, 2024 at 05:13:24PM +0000, Luis Henriques (SUSE) wrote:
> Since commit 9bab148bb3c7 ("common/fuzzy: exercise the filesystem a little
> harder after repairing") funtion _scratch_fuzz_modify() has become
> xfs-specific due to the use of some functions that assume this filesytem,
> namely _xfs_force_bdev() and _xfs_has_feature().
> 
> Ensure _scratch_fuzz_modify() works again with other filesystems by using
> these functions only when testing xfs.
> 
> Signed-off-by: Luis Henriques (SUSE) <luis.henriques@linux.dev>

Still looks ok,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  common/fuzzy | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/common/fuzzy b/common/fuzzy
> index f5d45cb28f07..218fe1654386 100644
> --- a/common/fuzzy
> +++ b/common/fuzzy
> @@ -8,15 +8,17 @@
>  _scratch_fuzz_modify() {
>  	echo "+++ stressing filesystem"
>  	mkdir -p $SCRATCH_MNT/data
> -	_xfs_force_bdev data $SCRATCH_MNT/data
> +	[ "$FSTYP" == "xfs" ] && _xfs_force_bdev data $SCRATCH_MNT/data
>  	$FSSTRESS_PROG -n $((TIME_FACTOR * 10000)) -p $((LOAD_FACTOR * 4)) -d $SCRATCH_MNT/data
>  
> -	if _xfs_has_feature "$SCRATCH_MNT" realtime; then
> -		mkdir -p $SCRATCH_MNT/rt
> -		_xfs_force_bdev realtime $SCRATCH_MNT/rt
> -		$FSSTRESS_PROG -n $((TIME_FACTOR * 10000)) -p $((LOAD_FACTOR * 4)) -d $SCRATCH_MNT/rt
> -	else
> -		echo "+++ xfs realtime not configured"
> +	if [ "$FSTYP" = "xfs" ]; then
> +		if _xfs_has_feature "$SCRATCH_MNT" realtime; then
> +			mkdir -p $SCRATCH_MNT/rt
> +			_xfs_force_bdev realtime $SCRATCH_MNT/rt
> +			$FSSTRESS_PROG -n $((TIME_FACTOR * 10000)) -p $((LOAD_FACTOR * 4)) -d $SCRATCH_MNT/rt
> +		else
> +			echo "+++ xfs realtime not configured"
> +		fi
>  	fi
>  }
>  
> 

  reply	other threads:[~2024-03-20  1:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 17:13 [PATCH v2 0/2] Ensure _scratch_fuzz_modify() works for other filesystems Luis Henriques (SUSE)
2024-03-15 17:13 ` [PATCH v2 1/2] common/fuzzy: make _scratch_fuzz_modify work for non-xfs filesystems Luis Henriques (SUSE)
2024-03-20  1:20   ` Darrick J. Wong [this message]
2024-03-15 17:13 ` [PATCH v2 2/2] ext4/006: take into account updates to _scratch_fuzz_modify() Luis Henriques (SUSE)
2024-03-20  1:21   ` Darrick J. Wong

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=20240320012042.GM6188@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=luis.henriques@linux.dev \
    /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