From: Darrick J. Wong Date: Wed, 21 May 2025 22:41:04 +0000 (-0700) Subject: xfs/273: fix test for internal zoned filesystems X-Git-Tag: v2025.07.13~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a9dc5ac464764d8c41ffbfe5f74e27b2aca41c29;p=xfstests-dev.git xfs/273: fix test for internal zoned filesystems For XFS filesystems with internal zoned sections, fsmap reports a u32 cookie for the device instead of an actual major/minor. Adjust the test accordingly. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Zorro Lang --- diff --git a/tests/xfs/273 b/tests/xfs/273 index 7e743179..87a1c623 100755 --- a/tests/xfs/273 +++ b/tests/xfs/273 @@ -50,6 +50,11 @@ rtdev_daddrs=$((rtdev_fsblocks * fsblock_bytes / 512)) ddev_devno=$(stat -c '%t:%T' $SCRATCH_DEV) if [ "$USE_EXTERNAL" = "yes" ] && [ -n "$SCRATCH_RTDEV" ]; then rtdev_devno=$(stat -c '%t:%T' $SCRATCH_RTDEV) +elif $XFS_INFO_PROG $SCRATCH_MNT | grep -q 'zoned=1'; then + # no external rt device and zoned=1 means fsmap reports internal device + # numbers instead of block major/minor. + ddev_devno="0:1" + rtdev_devno="0:3" fi $XFS_IO_PROG -c 'fsmap -m -n 65536' $SCRATCH_MNT | awk -F ',' \