From: "Darrick J. Wong" <djwong@kernel.org>
To: Hans Holmberg <hans.holmberg@wdc.com>
Cc: zlang@kernel.org, fstests@vger.kernel.org,
Christoph Hellwig <hch@lst.de>,
Damien Le Moal <dlemoal@kernel.org>,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH v2 1/2] xfs/647: turn rt dev block device lookup into a common helper
Date: Fri, 27 Mar 2026 08:19:58 -0700 [thread overview]
Message-ID: <20260327151958.GB6223@frogsfrogsfrogs> (raw)
In-Reply-To: <20260327123429.39330-2-hans.holmberg@wdc.com>
On Fri, Mar 27, 2026 at 01:34:28PM +0100, Hans Holmberg wrote:
> Turn the logic figuring out on which block device the rt data is stored on
> into a common helper.
>
> Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> common/xfs | 11 +++++++++++
> tests/xfs/647 | 10 +---------
> 2 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/common/xfs b/common/xfs
> index 7fa0db2e26b4..c81f939e68d2 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -737,6 +737,17 @@ _xfs_metadump_supports_rt()
> $XFS_METADUMP_PROG --help 2>&1 | grep -q -- '-r rtdev'
> }
>
> +# What block device is rt data located on for scratch?
> +_xfs_get_scratch_rtdev_bdev()
> +{
> + # Is the rt dev internal or not?
> + if [ -z "$SCRATCH_RTDEV" ]; then
> + echo "$SCRATCH_DEV"
> + else
> + echo "$SCRATCH_RTDEV"
> + fi
> +}
> +
> # Snapshot the metadata on the scratch device
> _scratch_xfs_metadump()
> {
> diff --git a/tests/xfs/647 b/tests/xfs/647
> index 76959b28c779..0ef340a14b07 100755
> --- a/tests/xfs/647
> +++ b/tests/xfs/647
> @@ -17,15 +17,7 @@ _begin_fstest auto quick zone
> _require_scratch
> _require_realtime
>
> -#
> -# Figure out if the rt section is internal or not
> -#
> -if [ -z "$SCRATCH_RTDEV" ]; then
> - zdev=$SCRATCH_DEV
> -else
> - zdev=$SCRATCH_RTDEV
> -fi
> -
> +zdev="$(_xfs_get_scratch_rtdev_bdev)"
> _require_zoned_device $zdev
> _require_command "$BLKZONE_PROG" blkzone
>
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2026-03-27 15:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 12:34 [PATCH v2 0/2] add test for zone_gc_low_space attribute writes Hans Holmberg
2026-03-27 12:34 ` [PATCH v2 1/2] xfs/647: turn rt dev block device lookup into a common helper Hans Holmberg
2026-03-27 15:19 ` Darrick J. Wong [this message]
2026-03-30 5:33 ` Christoph Hellwig
2026-03-27 12:34 ` [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses Hans Holmberg
2026-03-27 15:22 ` Darrick J. Wong
2026-03-31 20:42 ` Zorro Lang
2026-03-30 5:34 ` Christoph Hellwig
2026-03-31 20:39 ` Zorro Lang
2026-04-01 13:25 ` Hans Holmberg
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=20260327151958.GB6223@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=dlemoal@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hans.holmberg@wdc.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox