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>
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 ',' \