mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common/xfs: refactor agcount calculation for mounted filesystems
Create a helper function to return the number of AGs of a mounted filesystem so that we can get rid of the open-coded versions in various tests. The new helper will be used in a subsequent patch. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
a5a31b7913
commit
0c92d38b7b
+1
-1
@@ -63,7 +63,7 @@ for x in `seq 2 64`; do
|
||||
touch "${TESTFILE}.${x}"
|
||||
done
|
||||
inode="$(stat -c '%i' "${TESTFILE}.1")"
|
||||
agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
|
||||
agcount="$(_xfs_mount_agcount $SCRATCH_MNT)"
|
||||
umount "${SCRATCH_MNT}"
|
||||
|
||||
echo "+ check fs"
|
||||
|
||||
Reference in New Issue
Block a user