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 3/3] xfs: add a test that mkfs round up realtime subvolume sizes to the zone size
Date: Mon, 15 Dec 2025 11:25:52 -0800 [thread overview]
Message-ID: <20251215192552.GK7725@frogsfrogsfrogs> (raw)
In-Reply-To: <20251215095036.537938-4-hch@lst.de>
On Mon, Dec 15, 2025 at 10:50:29AM +0100, Christoph Hellwig wrote:
> Make sure mkfs doesn't create unmountable file systems.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> tests/xfs/653 | 33 +++++++++++++++++++++++++++++++++
> tests/xfs/653.out | 2 ++
> 2 files changed, 35 insertions(+)
> create mode 100755 tests/xfs/653
> create mode 100644 tests/xfs/653.out
>
> diff --git a/tests/xfs/653 b/tests/xfs/653
> new file mode 100755
> index 000000000000..07d9125c2ff0
> --- /dev/null
> +++ b/tests/xfs/653
> @@ -0,0 +1,33 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +# Copyright (c) 2025 Christoph Hellwig.
> +#
> +# FS QA Test No. 653
> +#
> +# Tests that mkfs for a zoned file system rounds realtime subvolume sizes up to
> +# the zone size to create mountable file systems.
What size rt volume does this create? It looks like you're specifying
an rt zone size of ... (1GB + 52K)? And testing that mkfs rounds the
rt volume size down to some multiple of that? Or is it rounding the
*zone* size down to 1G?
<confused>
--D
> +. ./common/preamble
> +_begin_fstest auto quick realtime growfs zone
> +
> +. ./common/filter
> +. ./common/zoned
> +
> +_require_realtime
> +_require_scratch
> +_require_scratch_size $((2 * 1024 * 1024)) # 1GiB in kiB units
> +
> +fsbsize=4096
> +unaligned_size=$((((1 * 1024 * 1024 * 1024) + (fsbsize * 13)) / fsbsize))
> +
> +# Manual mkfs and mount to not inject an existing RT device
> +echo "Try to format file system"
> +_try_mkfs_dev -b size=4k -r zoned=1,size=${unaligned_size}b $SCRATCH_DEV \
> + >> $seqres.full 2>&1 ||\
> + _notrun "cannot mkfs zoned filesystem"
> +_mount $SCRATCH_DEV $SCRATCH_MNT
> +umount $SCRATCH_MNT
> +
> +# success, all done
> +status=0
> +exit
> diff --git a/tests/xfs/653.out b/tests/xfs/653.out
> new file mode 100644
> index 000000000000..2cba5cdf1171
> --- /dev/null
> +++ b/tests/xfs/653.out
> @@ -0,0 +1,2 @@
> +QA output created by 653
> +Try to format file system
> --
> 2.47.3
>
>
next prev parent reply other threads:[~2025-12-15 19:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 9:50 various tests for zone aligned RT subvolumes Christoph Hellwig
2025-12-15 9:50 ` [PATCH 1/3] xfs: add a test that zoned file systems with rump RTG can't be mounted Christoph Hellwig
2025-12-15 19:33 ` Darrick J. Wong
2025-12-16 5:12 ` Christoph Hellwig
2025-12-16 19:05 ` Darrick J. Wong
2025-12-15 9:50 ` [PATCH 2/3] xfs: test that RT growfs not aligned to zone size fails Christoph Hellwig
2025-12-15 19:28 ` Darrick J. Wong
2025-12-16 5:12 ` Christoph Hellwig
2025-12-15 9:50 ` [PATCH 3/3] xfs: add a test that mkfs round up realtime subvolume sizes to the zone size Christoph Hellwig
2025-12-15 19:25 ` Darrick J. Wong [this message]
2025-12-16 5:13 ` 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=20251215192552.GK7725@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.