From: Christoph Hellwig <hch@lst.de>
To: Zorro Lang <zlang@kernel.org>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
Hans Holmberg <hans.holmberg@wdc.com>,
fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: [PATCH 04/16] xfs: add a zoned growfs test
Date: Thu, 8 May 2025 07:34:33 +0200 [thread overview]
Message-ID: <20250508053454.13687-5-hch@lst.de> (raw)
In-Reply-To: <20250508053454.13687-1-hch@lst.de>
Zoned file systems require zone aligned RT volume sizes. Because of
that xfs/596 won't work as-is. Copy it and test two zone capacity
aligned values.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
---
tests/xfs/4202 | 78 ++++++++++++++++++++++++++++++++++++++++++++++
tests/xfs/4202.out | 11 +++++++
2 files changed, 89 insertions(+)
create mode 100755 tests/xfs/4202
create mode 100644 tests/xfs/4202.out
diff --git a/tests/xfs/4202 b/tests/xfs/4202
new file mode 100755
index 000000000000..461827a14522
--- /dev/null
+++ b/tests/xfs/4202
@@ -0,0 +1,78 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2024 Christoph Hellwig
+#
+# FS QA Test No. 4202
+#
+# growfs QA tests - repeatedly fill/grow the rt volume of the filesystem check
+# the filesystem contents after each operation. This is the zoned equivalent of
+# xfs/596
+#
+. ./common/preamble
+_begin_fstest growfs ioctl auto zone
+
+_cleanup()
+{
+ rm -f $tmp.*
+}
+
+. ./common/filter
+. ./common/zoned
+
+_require_scratch
+_require_realtime
+_require_no_large_scratch_dev
+
+zone_capacity=$(_zone_capacity 0 $SCRATCH_RTDEV)
+
+fill_fs()
+{
+ if [ $# -ne 1 ]; then echo "Usage: fill_fs \"path\"" 1>&2 ; exit 1; fi
+ _do "Fill filesystem" \
+ "$here/src/fill2fs --verbose --dir=$1 --seed=0 --filesize=65536 --stddev=32768 --list=- >>$tmp.manifest"
+}
+
+_do_die_on_error=message_only
+rtsize=$zone_capacity
+echo -n "Make rt filesystem on SCRATCH_DEV and mount... "
+_scratch_mkfs_xfs -r size=${rtsize} | \
+ _filter_mkfs 2> "$tmp.mkfs" >> $seqres.full
+
+# for $dbsize
+. $tmp.mkfs
+
+_scratch_mount
+_require_xfs_scratch_zoned
+
+# We're growing the realtime device, so force new file creation there
+_xfs_force_bdev realtime $SCRATCH_MNT
+
+echo "done"
+
+#
+# Zone RT devices can only grow by entire zones.
+# Do that twice. The high starting code looks weird, but is neededed
+# due to the automatically added OP
+#
+for size in $(( 6 * $zone_capacity )) $(( 7 * $zone_capacity )); do
+ grow_size=$(( $size / $dbsize ))
+ fill_fs $SCRATCH_MNT/fill_$size
+ _do "Grow filesystem" "xfs_growfs -R $grow_size $SCRATCH_MNT"
+ echo -n "Flush filesystem... "
+ _do "_scratch_unmount"
+ _do "_try_scratch_mount"
+ echo "done"
+ echo -n "Check files... "
+ if ! _do "$here/src/fill2fs_check $tmp.manifest"; then
+ echo "fail (see $seqres.full)"
+ _do "cat $tmp.manifest"
+ _do "ls -altrR $SCRATCH_MNT"
+ status=1 ; exit
+ fi
+ echo "done"
+done
+
+# success, all done
+echo "Growfs tests passed."
+status=0 ; exit
diff --git a/tests/xfs/4202.out b/tests/xfs/4202.out
new file mode 100644
index 000000000000..66cab6aba8e2
--- /dev/null
+++ b/tests/xfs/4202.out
@@ -0,0 +1,11 @@
+QA output created by 4202
+Make rt filesystem on SCRATCH_DEV and mount... done
+Fill filesystem... done
+Grow filesystem... done
+Flush filesystem... done
+Check files... done
+Fill filesystem... done
+Grow filesystem... done
+Flush filesystem... done
+Check files... done
+Growfs tests passed.
--
2.47.2
next prev parent reply other threads:[~2025-05-08 5:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 5:34 new tests for zoned xfs v3 Christoph Hellwig
2025-05-08 5:34 ` [PATCH 01/16] common: generalize _filter_agno Christoph Hellwig
2025-05-08 15:12 ` Darrick J. Wong
2025-05-08 5:34 ` [PATCH 02/16] add a new rw_hint helper Christoph Hellwig
2025-05-08 5:34 ` [PATCH 03/16] xfs: add a test for zoned block accounting after remount Christoph Hellwig
2025-05-08 5:34 ` Christoph Hellwig [this message]
2025-05-08 5:34 ` [PATCH 05/16] xfs: add test to check for block layer reordering Christoph Hellwig
2025-05-08 5:34 ` [PATCH 06/16] xfs: add a test to check that data growfs fails with internal rt device Christoph Hellwig
2025-05-08 5:34 ` [PATCH 07/16] xfs: add a test for write lifetime hints Christoph Hellwig
2025-05-08 5:34 ` [PATCH 08/16] xfs: add a test for writeback after close Christoph Hellwig
2025-05-08 5:34 ` [PATCH 09/16] xfs: test zone stream separation for two direct writers Christoph Hellwig
2025-05-08 5:34 ` [PATCH 10/16] xfs: test zone stream separation for two buffered writers Christoph Hellwig
2025-05-08 5:34 ` [PATCH 11/16] xfs: test zoned ENOSPC behavior with multiple writers Christoph Hellwig
2025-05-08 5:34 ` [PATCH 12/16] xfs: test zoned GC file defragmentation for sequential writers Christoph Hellwig
2025-05-08 5:34 ` [PATCH 13/16] xfs: test zoned GC file defragmentation for random writers Christoph Hellwig
2025-05-08 5:34 ` [PATCH 14/16] xfs: test that xfs_repair does not mess up the zone used counter Christoph Hellwig
2025-05-08 5:34 ` [PATCH 15/16] xfs: test that truncate does not spuriously return ENOSPC Christoph Hellwig
2025-05-08 5:34 ` [PATCH 16/16] xfs: test that we can handle spurious zone wp advancements Christoph Hellwig
2025-05-08 18:43 ` new tests for zoned xfs v3 Zorro Lang
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=20250508053454.13687-5-hch@lst.de \
--to=hch@lst.de \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hans.holmberg@wdc.com \
--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;
as well as URLs for NNTP newsgroup(s).