public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: zlang@redhat.com, fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/3] xfs: add a _scratch_require_xfs_scrub helper
Date: Thu, 11 Jan 2024 09:20:38 -0800	[thread overview]
Message-ID: <20240111172038.GP723010@frogsfrogsfrogs> (raw)
In-Reply-To: <20240111142407.2163578-3-hch@lst.de>

On Thu, Jan 11, 2024 at 03:24:06PM +0100, Christoph Hellwig wrote:
> Add a helper to call _supports_xfs_scrub with $SCRATCH_MNT and
> $SCRATCH_DEV.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Thanks for the cleanup,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  common/xfs    | 7 +++++++
>  tests/xfs/556 | 2 +-
>  tests/xfs/716 | 2 +-
>  3 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/common/xfs b/common/xfs
> index 9db998837..bfe979dbb 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -661,6 +661,13 @@ _supports_xfs_scrub()
>  	return 0
>  }
>  
> +# Does the scratch file system support scrub?
> +_scratch_require_xfs_scrub()
> +{
> +	_supports_xfs_scrub $SCRATCH_MNT $SCRATCH_DEV || \
> +		_notrun "Scrub not supported"
> +}
> +
>  # Save a snapshot of a corrupt xfs filesystem for later debugging.
>  _xfs_metadump() {
>  	local metadump="$1"
> diff --git a/tests/xfs/556 b/tests/xfs/556
> index 061d8d572..6be993273 100755
> --- a/tests/xfs/556
> +++ b/tests/xfs/556
> @@ -40,7 +40,7 @@ _scratch_mkfs >> $seqres.full
>  _dmerror_init
>  _dmerror_mount >> $seqres.full 2>&1
>  
> -_supports_xfs_scrub $SCRATCH_MNT $SCRATCH_DEV || _notrun "Scrub not supported"
> +_scratch_require_xfs_scrub
>  
>  # Write a file with 4 file blocks worth of data
>  victim=$SCRATCH_MNT/a
> diff --git a/tests/xfs/716 b/tests/xfs/716
> index 930a0ecbb..4cfb27f18 100755
> --- a/tests/xfs/716
> +++ b/tests/xfs/716
> @@ -31,7 +31,7 @@ _require_test_program "punch-alternating"
>  _scratch_mkfs > $tmp.mkfs
>  _scratch_mount
>  
> -_supports_xfs_scrub $SCRATCH_MNT $SCRATCH_DEV || _notrun "Scrub not supported"
> +_scratch_require_xfs_scrub
>  
>  # Force data device extents so that we can create a file with the exact bmbt
>  # that we need regardless of rt configuration.
> -- 
> 2.39.2
> 

  reply	other threads:[~2024-01-11 17:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 14:24 _supports_xfs_scrub cleanups Christoph Hellwig
2024-01-11 14:24 ` [PATCH 1/3] xfs: check that the mountpoint is actually mounted in _supports_xfs_scrub Christoph Hellwig
2024-01-11 17:20   ` Darrick J. Wong
2024-01-11 17:25     ` Christoph Hellwig
2024-01-11 21:17       ` Zorro Lang
2024-01-12  2:17         ` Darrick J. Wong
2024-01-12  4:42           ` Christoph Hellwig
2024-01-12  4:41         ` Christoph Hellwig
2024-01-11 14:24 ` [PATCH 2/3] xfs: add a _scratch_require_xfs_scrub helper Christoph Hellwig
2024-01-11 17:20   ` Darrick J. Wong [this message]
2024-01-11 14:24 ` [PATCH 3/3] xfs/262: call _scratch_require_xfs_scrub Christoph Hellwig
2024-01-11 17:20   ` 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=20240111172038.GP723010@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@redhat.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