common/xfs: refactor agcount calculation for mounted filesystems
[xfstests-dev.git] / common / xfs
index 2b38e94..1bce3c1 100644 (file)
@@ -878,3 +878,9 @@ _force_xfsv4_mount_options()
        fi
        echo "MOUNT_OPTIONS = $MOUNT_OPTIONS" >>$seqres.full
 }
+
+# Find AG count of mounted filesystem
+_xfs_mount_agcount()
+{
+       $XFS_INFO_PROG "$1" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g'
+}