From: Darrick J. Wong Date: Tue, 16 Dec 2025 18:29:41 +0000 (-0800) Subject: common/rc: fix _xfs_is_realtime_file for internal rt devices X-Git-Tag: v2026.01.05~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d49e334213756882160117c27afa5c3b627760e6;p=xfstests-dev.git common/rc: fix _xfs_is_realtime_file for internal rt devices Now that we can have internal realtime devices, it's possible to have a realtime filesystem without setting USE_EXTERNAL=yes or SCRATCH_RTDEV. Use the existing _xfs_has_feature helper to figure out if the given path points to a filesystem with an online realtime volume. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Zorro Lang --- diff --git a/common/xfs b/common/xfs index ffdb82e6..8b1b8741 100644 --- a/common/xfs +++ b/common/xfs @@ -253,9 +253,9 @@ _xfs_get_dir_blocksize() # Decide if this path is a file on the realtime device _xfs_is_realtime_file() { - if [ "$USE_EXTERNAL" != "yes" ] || [ -z "$SCRATCH_RTDEV" ]; then - return 1 - fi + local mntpt="$(findmnt --target "$1" --noheadings --output TARGET)" + + _xfs_has_feature $mntpt realtime || return 1 $XFS_IO_PROG -c 'stat -v' "$1" | grep -q -w realtime }