]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/273: fix test for internal zoned filesystems
authorDarrick J. Wong <djwong@kernel.org>
Wed, 21 May 2025 22:41:04 +0000 (15:41 -0700)
committerZorro Lang <zlang@kernel.org>
Fri, 11 Jul 2025 13:17:39 +0000 (21:17 +0800)
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 <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/273

index 7e743179975e81c6d382185f29f4e1ac3c0f0360..87a1c623b73b46e00227733166aef4f0551c804f 100755 (executable)
@@ -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 ',' \