finishe xfstests support for zoned XFS
Hi all,
this series adds the remaining core bits to support zoned XFS file systems, to go along with the kernel code in 6.15-rc and the xfsprogs series on the list. It does not include several newly developed test cases which will be sent separately.
PATCH 1/4 xfs: check for zoned-specific errors in _try_scratch_mkfs_xfs
Check for a few errors issued for unsupported zoned configurations in _try_scratch_mkfs_xfs so that the test is not run instead of failed.
--- common/xfs | 5 +++++ 1 file changed, 5 insertions(+)
common/xfs +5 -0
@@ -160,6 +160,11 @@ _try_scratch_mkfs_xfs() grep -q crc=0 $tmp.mkfsstd && _force_xfsv4_mount_options + grep -q "zoned file systems do not support" $tmp.mkfserr && \ + _notrun "Not supported on zoned file systems" + grep -q "must be greater than the minimum zone count" $tmp.mkfserr && \ + _notrun "Zone count too small" + if [ $mkfs_status -eq 0 -a "$LARGE_SCRATCH_DEV" = yes ]; then # manually parse the mkfs output to get the fs size in bytes local fs_size
Signature · 1 line
2.47.2
PATCH 2/4 common: notrun in mkfs_dev for too small zoned file systems
In reply to Christoph HellwigSimilar to the regular scratch_mkfs, skip the test if the file system would be so small that there's not enough zones.
--- common/rc | 4 ++++ 1 file changed, 4 insertions(+)
common/rc +4 -0
@@ -906,6 +906,10 @@ _mkfs_dev() { local tmp=`mktemp -u` if ! _try_mkfs_dev "$@" 2>$tmp.mkfserr 1>$tmp.mkfsstd; then + grep -q "must be greater than the minimum zone count" $tmp.mkfserr && \ + _notrun "Zone count too small" + grep -q "too small for zoned allocator" $tmp.mkfserr && \ + _notrun "Zone count too small" # output stored mkfs output cat $tmp.mkfserr >&2 cat $tmp.mkfsstd
Signature · 1 line
2.47.2
PATCH 3/4 common: support internal RT device in _require_realtime
In reply to Christoph HellwigIf SCRATCH_DEV is a zoned device it implies an internal zoned RT device and should not be skipped in _require_realtime.
--- common/rc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
common/rc +9 -4
@@ -2351,10 +2351,15 @@ _require_no_large_scratch_dev() # _require_realtime() { - [ "$USE_EXTERNAL" = yes ] || \ - _notrun "External volumes not in use, skipped this test" - [ "$SCRATCH_RTDEV" = "" ] && \ - _notrun "Realtime device required, skipped this test" + 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 + fi } # This test requires that a realtime subvolume is not in use
Signature · 1 line
2.47.2
PATCH 4/4 common: support internal RT devices in scratch_mkfs_sized
In reply to Christoph Hellwig--- common/rc | 7 +++++++ 1 file changed, 7 insertions(+)
common/rc +7 -0
@@ -1267,6 +1267,7 @@ _try_scratch_mkfs_sized() case $FSTYP in xfs) local rt_ops + local zone_type=`_zone_type $SCRATCH_DEV` if [ -b "$SCRATCH_RTDEV" ]; then local rtdevsize=`blockdev --getsize64 $SCRATCH_RTDEV`
@@ -1274,6 +1275,12 @@ _try_scratch_mkfs_sized() _notrun "Scratch rt device too small" fi rt_ops="-r size=$fssize" + elif [ "${zone_type}" != "none" ] || + [[ $MKFS_OPTIONS =~ "zoned=1" ]]; then + # Maybe also add back the size check, but it'll require + # somewhat complicated arithmetics for the size of the + # conventional zones + rt_ops="-r size=$fssize" fi # don't override MKFS_OPTIONS that set a block size.
Signature · 1 line
2.47.2
Darrick J. Wong
Reviewed-byQuoted 6 lines · Christoph Hellwig
Hi all,
this series adds the remaining core bits to support zoned XFS file systems, to go along with the kernel code in 6.15-rc and the xfsprogs series on the list. It does not include several newly developed test cases which will be sent separately.
The series looks ok (by which I mean I've been running this for weeks with no issues) so
--D