# need 128M space, don't make any assumption
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
+
+# This test tries to grow the data device, which doesn't work for internal
+# zoned RT devices
+if [ -z "$SCRATCH_RTDEV" ]; then
+ _require_xfs_scratch_non_zoned
+fi
+
_require_fs_space $SCRATCH_MNT 196608
_scratch_unmount
onemeginblocks=`expr 1048576 / $bsize`
_scratch_mount
+# Growing the data device doesn't work with an internal RT volume directly
+# following the data device. But even without that this test forces data
+# to the data device, which often is tiny on zoned file systems.
+_require_xfs_scratch_non_zoned
+
# We're growing the data device, so force new file creation there
_xfs_force_bdev data $SCRATCH_MNT
_scratch_mkfs > "$seqres.full" 2>&1
_scratch_mount
+# The synthetic devices for internal zoned rt devices confuse the parser
+if [ -z "$SCRATCH_RTDEV" ]; then
+ _require_xfs_scratch_non_zoned
+fi
+
# Make sure everything is on the data device
_xfs_force_bdev data $SCRATCH_MNT
cat "$tmp.mkfs" > $seqres.full
_scratch_mount
+# The synthetic devices for internal zoned rt devices confuse the parser
+if [ -z "$SCRATCH_RTDEV" ]; then
+ _require_xfs_scratch_non_zoned
+fi
+
# Don't let the rt extent size perturb the fsmap output with unwritten
# extents in places we don't expect them
test $rtextsz -eq $dbsize || _notrun "Skipping test due to rtextsize > 1 fsb"
_scratch_mkfs_xfs -d size=100m -n size=64k >> $seqres.full 2>&1
_scratch_mount
+# When using the zone allocator, mkfs still creates an internal RT section by
+# default and the above unsetting SCRATCH_RTDEV of doesn't work.
+_require_xfs_scratch_non_zoned
+
# Fill a source directory with many largish-named files. 1k uuid-named entries
# sufficiently populates a 64k directory block.
mkdir $SCRATCH_MNT/src
. $tmp.mkfs
_scratch_mount
+# no support for rtextsize > 1 on zoned file systems
+_require_xfs_scratch_non_zoned
+
test $rtextsz -ne $dbsize || \
_notrun "cannot set rt extent size ($rtextsz) larger than fs block size ($dbsize)"
_scratch_mount
+# can't grow data volume on mixed configs
+_require_xfs_scratch_non_zoned
+
$XFS_SPACEMAN_PROG -c "info" $SCRATCH_MNT > $tmp.spaceman
echo SPACEMAN >> $seqres.full
cat $tmp.spaceman >> $seqres.full
_scratch_mkfs -r size=100m > $seqres.full
_try_scratch_mount || _notrun "Could not mount scratch with synthetic rt volume"
+# zoned file systems only support zoned size-rounded RT device sizes
+_require_xfs_scratch_non_zoned
+
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
_require_scratch_nocheck
_require_xfs_mkfs_cfgfile
+# reflink is currently not supported for zoned devices, and the normal support
+# checks for it don't work at mkfs time.
+_require_non_zoned_device $SCRATCH_DEV
+
echo "Silence is golden"
def_cfgfile=$TEST_DIR/a
_notrun "cannot set rt extent size ($rtextsz) larger than fs block size ($dbsize)"
_scratch_mount >> $seqres.full 2>&1
+# no support for rtextsize > 1 on zoned file systems
+_require_xfs_scratch_non_zoned
+
rootino=$(stat -c '%i' $SCRATCH_MNT)
_scratch_unmount
SCRATCH_RTDEV="" _scratch_mkfs | _filter_mkfs 2> $tmp.mkfs >> $seqres.full
_try_scratch_mount || _notrun "Can't mount file system"
+# Zoned file systems don't support rtextsize > 1
+_require_xfs_scratch_non_zoned
+
# Check that there's no realtime section.
source $tmp.mkfs
test $rtblocks -eq 0 || echo "expected 0 rtblocks, got $rtblocks"
}
_scratch_mkfs >> $seqres.full
+
+#
+# The dm-error map added by this test doesn't work on zoned devices because
+# table sizes need to be aligned to the zone size, and even for zoned on
+# conventional this test will get confused because of the internal RT device.
+#
+# That check requires a mounted file system, so do a dummy mount before setting
+# up DM.
+#
+_scratch_mount
+_require_xfs_scratch_non_zoned
+_scratch_unmount
+
_dmerror_init
_dmerror_mount >> $seqres.full 2>&1
onemeginblocks=`expr 1048576 / $dbsize`
_scratch_mount
+# growfs on zoned file systems only works on zone boundaries
+_require_xfs_scratch_non_zoned
+
# We're growing the realtime device, so force new file creation there
_xfs_force_bdev realtime $SCRATCH_MNT