* add another RT growfs test
@ 2026-06-09 8:00 Christoph Hellwig
2026-06-09 8:00 ` [PATCH 1/2] common: add a _require_external_realtime_device helper Christoph Hellwig
2026-06-09 8:00 ` [PATCH 2/2] xfs: test that a grown RT section can be filled Christoph Hellwig
0 siblings, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2026-06-09 8:00 UTC (permalink / raw)
To: Zorro Lang; +Cc: Darrick J. Wong, fstests, linux-xfs
Hi all,
this adds a test that actually tries to use the newly added space
after a RT growfs, and reproduces the currently terminally broken
zoned growfs. It includes a special check for zoned file systems,
so that it does not hang on unfixed kernels with zoned RT devices.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] common: add a _require_external_realtime_device helper
2026-06-09 8:00 add another RT growfs test Christoph Hellwig
@ 2026-06-09 8:00 ` Christoph Hellwig
2026-06-09 14:39 ` Darrick J. Wong
2026-06-10 6:34 ` Hans Holmberg
2026-06-09 8:00 ` [PATCH 2/2] xfs: test that a grown RT section can be filled Christoph Hellwig
1 sibling, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2026-06-09 8:00 UTC (permalink / raw)
To: Zorro Lang; +Cc: Darrick J. Wong, fstests, linux-xfs
Factor out the check for an RT device on an external section.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
common/rc | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/common/rc b/common/rc
index 71d872881610..336441c7a522 100644
--- a/common/rc
+++ b/common/rc
@@ -2405,6 +2405,17 @@ _require_no_large_scratch_dev()
_notrun "Large filesystem testing in progress, skipped this test"
}
+# require an external realtime device (excludes the internal RT device)
+_require_external_realtime_device()
+{
+ if [ "$USE_EXTERNAL" != "yes" ]; then
+ _notrun "External volumes not in use, skipped this test"
+ fi
+ if [ "$SCRATCH_RTDEV" = "" ]; then
+ _notrun "Realtime device required, skipped this test"
+ fi
+}
+
# this test requires that a realtime subvolume is in use, and
# that the kernel supports realtime as well.
#
@@ -2412,12 +2423,7 @@ _require_realtime()
{
local zone_type=`_zone_type $SCRATCH_DEV`
if [ "${zone_type}" = "none" ]; then
- if [ "$USE_EXTERNAL" != "yes" ]; then
- _notrun "External volumes not in use, skipped this test"
- fi
- if [ "$SCRATCH_RTDEV" = "" ]; then
- _notrun "Realtime device required, skipped this test"
- fi
+ _require_external_realtime_device
fi
}
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] common: add a _require_external_realtime_device helper
2026-06-09 8:00 ` [PATCH 1/2] common: add a _require_external_realtime_device helper Christoph Hellwig
@ 2026-06-09 14:39 ` Darrick J. Wong
2026-06-10 6:34 ` Hans Holmberg
1 sibling, 0 replies; 7+ messages in thread
From: Darrick J. Wong @ 2026-06-09 14:39 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Zorro Lang, fstests, linux-xfs
On Tue, Jun 09, 2026 at 10:00:43AM +0200, Christoph Hellwig wrote:
> Factor out the check for an RT device on an external section.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks good to me
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> common/rc | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/common/rc b/common/rc
> index 71d872881610..336441c7a522 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2405,6 +2405,17 @@ _require_no_large_scratch_dev()
> _notrun "Large filesystem testing in progress, skipped this test"
> }
>
> +# require an external realtime device (excludes the internal RT device)
> +_require_external_realtime_device()
> +{
> + if [ "$USE_EXTERNAL" != "yes" ]; then
> + _notrun "External volumes not in use, skipped this test"
> + fi
> + if [ "$SCRATCH_RTDEV" = "" ]; then
> + _notrun "Realtime device required, skipped this test"
> + fi
> +}
> +
> # this test requires that a realtime subvolume is in use, and
> # that the kernel supports realtime as well.
> #
> @@ -2412,12 +2423,7 @@ _require_realtime()
> {
> local zone_type=`_zone_type $SCRATCH_DEV`
> if [ "${zone_type}" = "none" ]; then
> - if [ "$USE_EXTERNAL" != "yes" ]; then
> - _notrun "External volumes not in use, skipped this test"
> - fi
> - if [ "$SCRATCH_RTDEV" = "" ]; then
> - _notrun "Realtime device required, skipped this test"
> - fi
> + _require_external_realtime_device
> fi
> }
>
> --
> 2.53.0
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] common: add a _require_external_realtime_device helper
2026-06-09 8:00 ` [PATCH 1/2] common: add a _require_external_realtime_device helper Christoph Hellwig
2026-06-09 14:39 ` Darrick J. Wong
@ 2026-06-10 6:34 ` Hans Holmberg
1 sibling, 0 replies; 7+ messages in thread
From: Hans Holmberg @ 2026-06-10 6:34 UTC (permalink / raw)
To: Christoph Hellwig, Zorro Lang
Cc: Darrick J. Wong, fstests@vger.kernel.org,
linux-xfs@vger.kernel.org
On 09/06/2026 10:04, Christoph Hellwig wrote:
> Factor out the check for an RT device on an external section.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Nice,
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
> ---
> common/rc | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/common/rc b/common/rc
> index 71d872881610..336441c7a522 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2405,6 +2405,17 @@ _require_no_large_scratch_dev()
> _notrun "Large filesystem testing in progress, skipped this test"
> }
>
> +# require an external realtime device (excludes the internal RT device)
> +_require_external_realtime_device()
> +{
> + if [ "$USE_EXTERNAL" != "yes" ]; then
> + _notrun "External volumes not in use, skipped this test"
> + fi
> + if [ "$SCRATCH_RTDEV" = "" ]; then
> + _notrun "Realtime device required, skipped this test"
> + fi
> +}
> +
> # this test requires that a realtime subvolume is in use, and
> # that the kernel supports realtime as well.
> #
> @@ -2412,12 +2423,7 @@ _require_realtime()
> {
> local zone_type=`_zone_type $SCRATCH_DEV`
> if [ "${zone_type}" = "none" ]; then
> - if [ "$USE_EXTERNAL" != "yes" ]; then
> - _notrun "External volumes not in use, skipped this test"
> - fi
> - if [ "$SCRATCH_RTDEV" = "" ]; then
> - _notrun "Realtime device required, skipped this test"
> - fi
> + _require_external_realtime_device
> fi
> }
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] xfs: test that a grown RT section can be filled
2026-06-09 8:00 add another RT growfs test Christoph Hellwig
2026-06-09 8:00 ` [PATCH 1/2] common: add a _require_external_realtime_device helper Christoph Hellwig
@ 2026-06-09 8:00 ` Christoph Hellwig
2026-06-09 14:40 ` Darrick J. Wong
2026-06-10 6:42 ` Hans Holmberg
1 sibling, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2026-06-09 8:00 UTC (permalink / raw)
To: Zorro Lang; +Cc: Darrick J. Wong, fstests, linux-xfs
This reproduces issues with zoned growfs.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
tests/xfs/4201 | 58 ++++++++++++++++++++++++++++++++++++++++++++++
tests/xfs/4201.out | 3 +++
2 files changed, 61 insertions(+)
create mode 100755 tests/xfs/4201
create mode 100644 tests/xfs/4201.out
diff --git a/tests/xfs/4201 b/tests/xfs/4201
new file mode 100755
index 000000000000..1f1c8e7eb140
--- /dev/null
+++ b/tests/xfs/4201
@@ -0,0 +1,58 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2026 Christoph Hellwig.
+#
+# FS QA Test No. 4201
+#
+# Test that the entire device capacity can be used after resizing a realtime
+# device.
+#
+. ./common/preamble
+_begin_fstest auto quick realtime growfs zone
+
+. ./common/filter
+. ./common/zoned
+
+_require_scratch
+_require_external_realtime_device
+
+minrtdevsize=$((5 * 1024 * 1024)) #kB
+rtdevsize=`_get_device_size $SCRATCH_RTDEV`
+if [ $rtdevsize -lt $minrtdevsize ]; then
+ _notrun "SCRATCH_RTDEV device too small, $rtdevsize < $minrtdevsize"
+fi
+
+_scratch_mkfs -r size=1g >> $seqres.full 2>&1
+rblocks=`_scratch_xfs_get_sb_field rblocks`
+
+_scratch_mount
+_xfs_force_bdev realtime $SCRATCH_MNT
+free_zones_pre=$(_xfs_get_mountstat $SCRATCH_MNT "free zones:")
+
+echo "Growing file system"
+$XFS_GROWFS_PROG $SCRATCH_MNT -R $((2 * rblocks)) >> $seqres.full 2>&1 || \
+ _fail "growfs failed"
+
+# For zoned file systems, check that the growfs did increase the available free
+# zones. This avoids a hang on unfixed kernels when filling later.
+free_zones_post=$(_xfs_get_mountstat $SCRATCH_MNT "free zones:")
+if _has_fs_sysfs_attr $SCRATCH_DEV "zoned/max_open_zones"; then
+ if [ "$free_zones_pre" == "$free_zones_post" ]; then
+ _fail "growfs did not increase free zones"
+ fi
+fi
+
+echo "Filling grown file system"
+writesize_mb=32
+dd if=/dev/zero of=$SCRATCH_MNT/fill bs=${writesize_mb}M oflag=direct \
+ >> $seqres.full 2>&1
+
+blocksize=$(_get_block_size $SCRATCH_MNT)
+free_blocks=$(stat -f $SCRATCH_MNT -c '%f')
+
+# check that we really mostly filled the file system
+_within_tolerance "free space after fill" \
+ $free_blocks $((writesize_mb * 1024 * 1024 / blocksize)) 100%
+
+status=0
+exit
diff --git a/tests/xfs/4201.out b/tests/xfs/4201.out
new file mode 100644
index 000000000000..2e7ac4019f3f
--- /dev/null
+++ b/tests/xfs/4201.out
@@ -0,0 +1,3 @@
+QA output created by 4201
+Growing file system
+Filling grown file system
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 2/2] xfs: test that a grown RT section can be filled
2026-06-09 8:00 ` [PATCH 2/2] xfs: test that a grown RT section can be filled Christoph Hellwig
@ 2026-06-09 14:40 ` Darrick J. Wong
2026-06-10 6:42 ` Hans Holmberg
1 sibling, 0 replies; 7+ messages in thread
From: Darrick J. Wong @ 2026-06-09 14:40 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Zorro Lang, fstests, linux-xfs
On Tue, Jun 09, 2026 at 10:00:44AM +0200, Christoph Hellwig wrote:
> This reproduces issues with zoned growfs.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks good to me
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> tests/xfs/4201 | 58 ++++++++++++++++++++++++++++++++++++++++++++++
> tests/xfs/4201.out | 3 +++
> 2 files changed, 61 insertions(+)
> create mode 100755 tests/xfs/4201
> create mode 100644 tests/xfs/4201.out
>
> diff --git a/tests/xfs/4201 b/tests/xfs/4201
> new file mode 100755
> index 000000000000..1f1c8e7eb140
> --- /dev/null
> +++ b/tests/xfs/4201
> @@ -0,0 +1,58 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +# Copyright (c) 2026 Christoph Hellwig.
> +#
> +# FS QA Test No. 4201
> +#
> +# Test that the entire device capacity can be used after resizing a realtime
> +# device.
> +#
> +. ./common/preamble
> +_begin_fstest auto quick realtime growfs zone
> +
> +. ./common/filter
> +. ./common/zoned
> +
> +_require_scratch
> +_require_external_realtime_device
> +
> +minrtdevsize=$((5 * 1024 * 1024)) #kB
> +rtdevsize=`_get_device_size $SCRATCH_RTDEV`
> +if [ $rtdevsize -lt $minrtdevsize ]; then
> + _notrun "SCRATCH_RTDEV device too small, $rtdevsize < $minrtdevsize"
> +fi
> +
> +_scratch_mkfs -r size=1g >> $seqres.full 2>&1
> +rblocks=`_scratch_xfs_get_sb_field rblocks`
> +
> +_scratch_mount
> +_xfs_force_bdev realtime $SCRATCH_MNT
> +free_zones_pre=$(_xfs_get_mountstat $SCRATCH_MNT "free zones:")
> +
> +echo "Growing file system"
> +$XFS_GROWFS_PROG $SCRATCH_MNT -R $((2 * rblocks)) >> $seqres.full 2>&1 || \
> + _fail "growfs failed"
> +
> +# For zoned file systems, check that the growfs did increase the available free
> +# zones. This avoids a hang on unfixed kernels when filling later.
> +free_zones_post=$(_xfs_get_mountstat $SCRATCH_MNT "free zones:")
> +if _has_fs_sysfs_attr $SCRATCH_DEV "zoned/max_open_zones"; then
> + if [ "$free_zones_pre" == "$free_zones_post" ]; then
> + _fail "growfs did not increase free zones"
> + fi
> +fi
> +
> +echo "Filling grown file system"
> +writesize_mb=32
> +dd if=/dev/zero of=$SCRATCH_MNT/fill bs=${writesize_mb}M oflag=direct \
> + >> $seqres.full 2>&1
> +
> +blocksize=$(_get_block_size $SCRATCH_MNT)
> +free_blocks=$(stat -f $SCRATCH_MNT -c '%f')
> +
> +# check that we really mostly filled the file system
> +_within_tolerance "free space after fill" \
> + $free_blocks $((writesize_mb * 1024 * 1024 / blocksize)) 100%
> +
> +status=0
> +exit
> diff --git a/tests/xfs/4201.out b/tests/xfs/4201.out
> new file mode 100644
> index 000000000000..2e7ac4019f3f
> --- /dev/null
> +++ b/tests/xfs/4201.out
> @@ -0,0 +1,3 @@
> +QA output created by 4201
> +Growing file system
> +Filling grown file system
> --
> 2.53.0
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 2/2] xfs: test that a grown RT section can be filled
2026-06-09 8:00 ` [PATCH 2/2] xfs: test that a grown RT section can be filled Christoph Hellwig
2026-06-09 14:40 ` Darrick J. Wong
@ 2026-06-10 6:42 ` Hans Holmberg
1 sibling, 0 replies; 7+ messages in thread
From: Hans Holmberg @ 2026-06-10 6:42 UTC (permalink / raw)
To: Christoph Hellwig, Zorro Lang
Cc: Darrick J. Wong, fstests@vger.kernel.org,
linux-xfs@vger.kernel.org
On 09/06/2026 10:12, Christoph Hellwig wrote:
> This reproduces issues with zoned growfs.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Great!
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
> ---
> tests/xfs/4201 | 58 ++++++++++++++++++++++++++++++++++++++++++++++
> tests/xfs/4201.out | 3 +++
> 2 files changed, 61 insertions(+)
> create mode 100755 tests/xfs/4201
> create mode 100644 tests/xfs/4201.out
>
> diff --git a/tests/xfs/4201 b/tests/xfs/4201
> new file mode 100755
> index 000000000000..1f1c8e7eb140
> --- /dev/null
> +++ b/tests/xfs/4201
> @@ -0,0 +1,58 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +# Copyright (c) 2026 Christoph Hellwig.
> +#
> +# FS QA Test No. 4201
> +#
> +# Test that the entire device capacity can be used after resizing a realtime
> +# device.
> +#
> +. ./common/preamble
> +_begin_fstest auto quick realtime growfs zone
> +
> +. ./common/filter
> +. ./common/zoned
> +
> +_require_scratch
> +_require_external_realtime_device
> +
> +minrtdevsize=$((5 * 1024 * 1024)) #kB
> +rtdevsize=`_get_device_size $SCRATCH_RTDEV`
> +if [ $rtdevsize -lt $minrtdevsize ]; then
> + _notrun "SCRATCH_RTDEV device too small, $rtdevsize < $minrtdevsize"
> +fi
> +
> +_scratch_mkfs -r size=1g >> $seqres.full 2>&1
> +rblocks=`_scratch_xfs_get_sb_field rblocks`
> +
> +_scratch_mount
> +_xfs_force_bdev realtime $SCRATCH_MNT
> +free_zones_pre=$(_xfs_get_mountstat $SCRATCH_MNT "free zones:")
> +
> +echo "Growing file system"
> +$XFS_GROWFS_PROG $SCRATCH_MNT -R $((2 * rblocks)) >> $seqres.full 2>&1 || \
> + _fail "growfs failed"
> +
> +# For zoned file systems, check that the growfs did increase the available free
> +# zones. This avoids a hang on unfixed kernels when filling later.
> +free_zones_post=$(_xfs_get_mountstat $SCRATCH_MNT "free zones:")
> +if _has_fs_sysfs_attr $SCRATCH_DEV "zoned/max_open_zones"; then
> + if [ "$free_zones_pre" == "$free_zones_post" ]; then
> + _fail "growfs did not increase free zones"
> + fi
> +fi
> +
> +echo "Filling grown file system"
> +writesize_mb=32
> +dd if=/dev/zero of=$SCRATCH_MNT/fill bs=${writesize_mb}M oflag=direct \
> + >> $seqres.full 2>&1
> +
> +blocksize=$(_get_block_size $SCRATCH_MNT)
> +free_blocks=$(stat -f $SCRATCH_MNT -c '%f')
> +
> +# check that we really mostly filled the file system
> +_within_tolerance "free space after fill" \
> + $free_blocks $((writesize_mb * 1024 * 1024 / blocksize)) 100%
> +
> +status=0
> +exit
> diff --git a/tests/xfs/4201.out b/tests/xfs/4201.out
> new file mode 100644
> index 000000000000..2e7ac4019f3f
> --- /dev/null
> +++ b/tests/xfs/4201.out
> @@ -0,0 +1,3 @@
> +QA output created by 4201
> +Growing file system
> +Filling grown file system
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-06-10 6:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 8:00 add another RT growfs test Christoph Hellwig
2026-06-09 8:00 ` [PATCH 1/2] common: add a _require_external_realtime_device helper Christoph Hellwig
2026-06-09 14:39 ` Darrick J. Wong
2026-06-10 6:34 ` Hans Holmberg
2026-06-09 8:00 ` [PATCH 2/2] xfs: test that a grown RT section can be filled Christoph Hellwig
2026-06-09 14:40 ` Darrick J. Wong
2026-06-10 6:42 ` Hans Holmberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox