* [PATCH] common/filestreams: check zoned device before mkfs with small dsize
@ 2026-06-03 5:27 Shin'ichiro Kawasaki
2026-06-05 4:08 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-06-03 5:27 UTC (permalink / raw)
To: fstests; +Cc: linux-xfs, Christoph Hellwig, Shin'ichiro Kawasaki
The test case xfs/170 performs file stream tests and must be skipped for
zoned scratch devices since the filestream feature is not supported. The
test calls _require_xfs_scratch_non_zoned() to check if the scratch
device is zoned.
This check is done after _try_scratch_mkfs_xfs() with a small dsize
parameter. However, mkfs.xfs creates an inode for each zone, and when a
zoned device has many zones, the small dsize causes metadata area
shortage and mkfs fails. This unexpected failure causes the test to fail
even though it should be skipped for zoned devices.
Move the zoned device check to occur before the constrained mkfs. First
perform a usual mkfs without the small dsize parameter to ensure the
device can be properly checked for zoned mode, then verify it's non-
zoned before proceeding with the small dsize mkfs.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
common/filestreams | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/common/filestreams b/common/filestreams
index ace8f3b7..838b5921 100644
--- a/common/filestreams
+++ b/common/filestreams
@@ -86,6 +86,14 @@ _test_streams() {
# off the filestreams allocator.
unset SCRATCH_RTDEV
+ # Skip these tests on zoned file systems as filestreams don't work
+ # with the zoned allocator, and the operation below would force it into
+ # the tiny data section only used for metadata anyway.
+ _try_scratch_mkfs_xfs >/dev/null 2>&1 || _fail "mkfs failed"
+ _scratch_mount
+ _require_xfs_scratch_non_zoned
+ _scratch_unmount 2>/dev/null
+
local size=`expr $agsize \* 1024 \* 1024 \* $agcount`
_try_scratch_mkfs_xfs -dsize=$size,agcount=$agcount >/dev/null 2>&1 \
|| _fail "mkfs failed"
@@ -99,11 +107,6 @@ _test_streams() {
_scratch_mount
fi
- # Skip these tests on zoned file systems as filestreams don't work
- # with the zoned allocator, and the above would force it into the
- # tiny data section only used for metadata anyway.
- _require_xfs_scratch_non_zoned
-
cd $SCRATCH_MNT
# start $stream_count streams
--
2.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-05 4:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 5:27 [PATCH] common/filestreams: check zoned device before mkfs with small dsize Shin'ichiro Kawasaki
2026-06-05 4:08 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox