xfs: abstract xfs_info into $XFS_INFO_PROG
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 5 Jun 2018 16:43:27 +0000 (09:43 -0700)
committerEryu Guan <guaneryu@gmail.com>
Fri, 8 Jun 2018 06:12:18 +0000 (14:12 +0800)
Abstract calls to xfs_info into $XFS_INFO_PROG like we do for all
other xfs utilities.

[Eryu: require xfs_info to be present if FSTYP is xfs]

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
34 files changed:
common/attr
common/config
common/populate
common/rc
common/xfs
tests/shared/298
tests/xfs/067
tests/xfs/073
tests/xfs/085
tests/xfs/086
tests/xfs/087
tests/xfs/088
tests/xfs/089
tests/xfs/091
tests/xfs/093
tests/xfs/097
tests/xfs/099
tests/xfs/100
tests/xfs/101
tests/xfs/102
tests/xfs/105
tests/xfs/112
tests/xfs/113
tests/xfs/127
tests/xfs/130
tests/xfs/190
tests/xfs/206
tests/xfs/233
tests/xfs/235
tests/xfs/271
tests/xfs/307
tests/xfs/308
tests/xfs/310
tests/xfs/348

index 3d1385a..49679d3 100644 (file)
@@ -30,7 +30,7 @@ _acl_get_max()
                # CRC format filesystems have much larger ACL counts. The actual
                # number is into the thousands, but testing that meany takes too
                # long, so just test well past the old limit of 25.
-               xfs_info $TEST_DIR | _filter_mkfs > /dev/null 2> $tmp.info
+               $XFS_INFO_PROG $TEST_DIR | _filter_mkfs > /dev/null 2> $tmp.info
                . $tmp.info
                rm $tmp.info
                if [ $_fs_has_crcs -eq 0 ]; then
index 221581d..d515005 100644 (file)
@@ -205,6 +205,7 @@ export TIMEOUT_PROG="$(type -P timeout)"
 export SETCAP_PROG="$(type -P setcap)"
 export GETCAP_PROG="$(type -P getcap)"
 export CHECKBASHISMS_PROG="$(type -P checkbashisms)"
+export XFS_INFO_PROG="$(type -P xfs_info)"
 
 # use 'udevadm settle' or 'udevsettle' to wait for lv to be settled.
 # newer systems have udevadm command but older systems like RHEL5 don't.
index 07ea7e6..b2dd053 100644 (file)
@@ -117,7 +117,7 @@ _populate_xfs_qmount_option()
        fi
 
        # Turn on all the quotas
-       if xfs_info "${TEST_DIR}" | grep -q 'crc=1'; then
+       if $XFS_INFO_PROG "${TEST_DIR}" | grep -q 'crc=1'; then
                # v5 filesystems can have group & project quotas
                quota="usrquota,grpquota,prjquota"
        else
@@ -151,7 +151,7 @@ _scratch_xfs_populate() {
        _populate_xfs_qmount_option
        _scratch_mount
        blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
-       dblksz="$(xfs_info "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
+       dblksz="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
        leaf_lblk="$((32 * 1073741824 / blksz))"
        node_lblk="$((64 * 1073741824 / blksz))"
 
@@ -267,7 +267,7 @@ _scratch_xfs_populate() {
        ./src/punch-alternating "${SCRATCH_MNT}/BNOBT"
 
        # Reverse-mapping btree
-       is_rmapbt="$(xfs_info "${SCRATCH_MNT}" | grep -c 'rmapbt=1')"
+       is_rmapbt="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep -c 'rmapbt=1')"
        if [ $is_rmapbt -gt 0 ]; then
                echo "+ rmapbt btree"
                nr="$((blksz * 2 / 24))"
@@ -276,7 +276,7 @@ _scratch_xfs_populate() {
        fi
 
        # Realtime Reverse-mapping btree
-       is_rt="$(xfs_info "${SCRATCH_MNT}" | grep -c 'rtextents=[1-9]')"
+       is_rt="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep -c 'rtextents=[1-9]')"
        if [ $is_rmapbt -gt 0 ] && [ $is_rt -gt 0 ]; then
                echo "+ rtrmapbt btree"
                nr="$((blksz * 2 / 32))"
@@ -285,7 +285,7 @@ _scratch_xfs_populate() {
        fi
 
        # Reference-count btree
-       is_reflink="$(xfs_info "${SCRATCH_MNT}" | grep -c 'reflink=1')"
+       is_reflink="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep -c 'reflink=1')"
        if [ $is_reflink -gt 0 ]; then
                echo "+ reflink btree"
                nr="$((blksz * 2 / 12))"
@@ -534,12 +534,12 @@ _scratch_xfs_populate_check() {
        leaf_attr="$(__populate_find_inode "${SCRATCH_MNT}/ATTR.FMT_LEAF")"
        node_attr="$(__populate_find_inode "${SCRATCH_MNT}/ATTR.FMT_NODE")"
        btree_attr="$(__populate_find_inode "${SCRATCH_MNT}/ATTR.FMT_BTREE")"
-       is_finobt=$(xfs_info "${SCRATCH_MNT}" | grep -c 'finobt=1')
-       is_rmapbt=$(xfs_info "${SCRATCH_MNT}" | grep -c 'rmapbt=1')
-       is_reflink=$(xfs_info "${SCRATCH_MNT}" | grep -c 'reflink=1')
+       is_finobt=$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep -c 'finobt=1')
+       is_rmapbt=$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep -c 'rmapbt=1')
+       is_reflink=$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep -c 'reflink=1')
 
        blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
-       dblksz="$(xfs_info "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
+       dblksz="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
        leaf_lblk="$((32 * 1073741824 / blksz))"
        node_lblk="$((64 * 1073741824 / blksz))"
        umount "${SCRATCH_MNT}"
index f04c9ea..9d6665b 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -136,6 +136,7 @@ case "$FSTYP" in
         [ "$XFS_REPAIR_PROG" = "" ] && _fatal "xfs_repair not found"
         [ "$XFS_DB_PROG" = "" ] && _fatal "xfs_db not found"
         [ "$MKFS_XFS_PROG" = "" ] && _fatal "mkfs_xfs not found"
+        [ "$XFS_INFO_PROG" = "" ] && _fatal "xfs_info not found"
 
         . ./common/xfs
         ;;
@@ -320,7 +321,7 @@ _supports_filetype()
        local fstyp=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $2}'`
        case "$fstyp" in
        xfs)
-               xfs_info $dir | grep -q "ftype=1"
+               $XFS_INFO_PROG $dir | grep -q "ftype=1"
                ;;
        ext2|ext3|ext4)
                local dev=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $1}'`
index 9222351..5b3fb28 100644 (file)
@@ -236,7 +236,7 @@ _require_scratch_xfs_crc()
        _scratch_mkfs_xfs >/dev/null 2>&1
        _try_scratch_mount >/dev/null 2>&1 \
           || _notrun "Kernel doesn't support crc feature"
-       xfs_info $SCRATCH_MNT | grep -q 'crc=1' || _notrun "crc feature not supported by this filesystem"
+       $XFS_INFO_PROG $SCRATCH_MNT | grep -q 'crc=1' || _notrun "crc feature not supported by this filesystem"
        _scratch_unmount
 }
 
@@ -477,7 +477,7 @@ _require_xfs_test_rmapbt()
 {
        _require_test
 
-       if [ "$(xfs_info "$TEST_DIR" | grep -c "rmapbt=1")" -ne 1 ]; then
+       if [ "$($XFS_INFO_PROG "$TEST_DIR" | grep -c "rmapbt=1")" -ne 1 ]; then
                _notrun "rmapbt not supported by test filesystem type: $FSTYP"
        fi
 }
@@ -488,7 +488,7 @@ _require_xfs_scratch_rmapbt()
 
        _scratch_mkfs > /dev/null
        _scratch_mount
-       if [ "$(xfs_info "$SCRATCH_MNT" | grep -c "rmapbt=1")" -ne 1 ]; then
+       if [ "$($XFS_INFO_PROG "$SCRATCH_MNT" | grep -c "rmapbt=1")" -ne 1 ]; then
                _scratch_unmount
                _notrun "rmapbt not supported by scratch filesystem type: $FSTYP"
        fi
index 0a11300..9c8e096 100755 (executable)
@@ -69,7 +69,7 @@ get_free_sectors()
                     }'
        ;;
        xfs)
-       agsize=`xfs_info $loop_mnt | $SED_PROG -n 's/.*agsize=\(.*\) blks.*/\1/p'`
+       agsize=`$XFS_INFO_PROG $loop_mnt | $SED_PROG -n 's/.*agsize=\(.*\) blks.*/\1/p'`
        # Convert free space (agno, block, length) to (start sector, end sector)
        $UMOUNT_PROG $loop_mnt
        $XFS_DB_PROG -r -c "freesp -d" $img_file | $SED_PROG '/^.*from/,$d'| \
index 743d94b..4aa8966 100755 (executable)
@@ -53,7 +53,7 @@ if [ "$isize" -lt 1024 ]; then
        || _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
 fi
 _scratch_mount
-xfs_info $SCRATCH_MNT >>$seqres.full
+$XFS_INFO_PROG $SCRATCH_MNT >>$seqres.full
 cd $SCRATCH_MNT
 
 echo ""
index 9bcc95d..c1870be 100755 (executable)
@@ -107,11 +107,11 @@ _verify_copy()
        diff -u $tmp.manifest1 $tmp.manifest2
 
        echo comparing new image geometry to old
-       xfs_info $source_dir \
+       $XFS_INFO_PROG $source_dir \
                | _filter_copy $source $source_dir '/dev/loop.' '#' \
                | tr -s ' ' \
                > $tmp.geometry1
-       xfs_info $target_dir \
+       $XFS_INFO_PROG $target_dir \
                | _filter_copy $target $target_dir '/dev/loop.' '#' \
                | tr -s ' ' \
                > $tmp.geometry2
index 57fc47c..8f93229 100755 (executable)
@@ -78,7 +78,7 @@ for x in `seq 2 64`; do
        touch "${TESTFILE}.${x}"
 done
 inode="$(stat -c '%i' "${TESTFILE}.1")"
-agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
+agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
 umount "${SCRATCH_MNT}"
 
 echo "+ check fs"
index 98b45dd..d05b061 100755 (executable)
@@ -79,7 +79,7 @@ for x in `seq 2 64`; do
        touch "${TESTFILE}.${x}"
 done
 inode="$(stat -c '%i' "${TESTFILE}.1")"
-agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
+agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
 test "${agcount}" -gt 1 || _notrun "Single-AG XFS not supported"
 umount "${SCRATCH_MNT}"
 
index 65877c7..4549597 100755 (executable)
@@ -79,7 +79,7 @@ for x in `seq 2 64`; do
        touch "${TESTFILE}.${x}"
 done
 inode="$(stat -c '%i' "${TESTFILE}.1")"
-agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
+agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
 umount "${SCRATCH_MNT}"
 
 echo "+ check fs"
index 14b1f11..f46c1ea 100755 (executable)
@@ -79,7 +79,7 @@ for x in `seq 2 64`; do
        touch "${TESTFILE}.${x}"
 done
 inode="$(stat -c '%i' "${TESTFILE}.1")"
-agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
+agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
 umount "${SCRATCH_MNT}"
 
 echo "+ check fs"
index e47f7fe..5b80860 100755 (executable)
@@ -79,7 +79,7 @@ for x in `seq 2 64`; do
        touch "${TESTFILE}.${x}"
 done
 inode="$(stat -c '%i' "${TESTFILE}.1")"
-agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
+agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
 umount "${SCRATCH_MNT}"
 
 echo "+ check fs"
index 7adbdc9..5e50e8a 100755 (executable)
@@ -79,7 +79,7 @@ for x in `seq 2 64`; do
        touch "${TESTFILE}.${x}"
 done
 inode="$(stat -c '%i' "${TESTFILE}.1")"
-agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
+agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
 umount "${SCRATCH_MNT}"
 
 echo "+ check fs"
index 440cdb6..aa9c360 100755 (executable)
@@ -79,7 +79,7 @@ for x in `seq 2 64`; do
        touch "${TESTFILE}.${x}"
 done
 inode="$(stat -c '%i' "${TESTFILE}.1")"
-agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
+agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
 umount "${SCRATCH_MNT}"
 
 echo "+ check fs"
index 703bd9b..56104ee 100755 (executable)
@@ -65,7 +65,7 @@ _scratch_mkfs_xfs > /dev/null
 
 echo "+ mount fs image"
 _scratch_mount
-xfs_info "${SCRATCH_MNT}" | grep -q "finobt=1" || _notrun "finobt not enabled"
+$XFS_INFO_PROG "${SCRATCH_MNT}" | grep -q "finobt=1" || _notrun "finobt not enabled"
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 
 echo "+ make some files"
@@ -82,7 +82,7 @@ for x in `seq 2 64`; do
        touch "${TESTFILE}.${x}"
 done
 inode="$(stat -c '%i' "${TESTFILE}.1")"
-agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
+agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
 umount "${SCRATCH_MNT}"
 
 echo "+ check fs"
index 2d63536..d9aad7e 100755 (executable)
@@ -61,7 +61,7 @@ _scratch_mkfs_xfs > /dev/null
 
 echo "+ mount fs image"
 _scratch_mount
-dblksz="$(xfs_info "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
+dblksz="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
 nr="$((dblksz / 40))"
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 leaf_lblk="$((32 * 1073741824 / blksz))"
index 83146ee..1e76fc4 100755 (executable)
@@ -61,7 +61,7 @@ _scratch_mkfs_xfs > /dev/null
 
 echo "+ mount fs image"
 _scratch_mount
-dblksz="$(xfs_info "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
+dblksz="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
 nr="$((dblksz / 12))"
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 leaf_lblk="$((32 * 1073741824 / blksz))"
index 426c3e9..0e5ed60 100755 (executable)
@@ -61,7 +61,7 @@ _scratch_mkfs_xfs > /dev/null
 
 echo "+ mount fs image"
 _scratch_mount
-dblksz="$(xfs_info "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
+dblksz="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
 nr="$((dblksz / 12))"
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 leaf_lblk="$((32 * 1073741824 / blksz))"
index 02bc35c..ec55c3a 100755 (executable)
@@ -61,7 +61,7 @@ _scratch_mkfs_xfs > /dev/null
 
 echo "+ mount fs image"
 _scratch_mount
-dblksz="$(xfs_info "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
+dblksz="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
 nr="$((16 * dblksz / 40))"
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 leaf_lblk="$((32 * 1073741824 / blksz))"
index c3a853b..bac6e28 100755 (executable)
@@ -61,7 +61,7 @@ _scratch_mkfs_xfs > /dev/null
 
 echo "+ mount fs image"
 _scratch_mount
-dblksz="$(xfs_info "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
+dblksz="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
 nr="$((16 * dblksz / 40))"
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 leaf_lblk="$((32 * 1073741824 / blksz))"
index cec3a16..fc2ee95 100755 (executable)
@@ -61,7 +61,7 @@ _scratch_mkfs_xfs > /dev/null
 
 echo "+ mount fs image"
 _scratch_mount
-dblksz="$(xfs_info "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
+dblksz="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
 nr="$((16 * dblksz / 40))"
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 leaf_lblk="$((32 * 1073741824 / blksz))"
index 17af3b6..b19d948 100755 (executable)
@@ -61,7 +61,7 @@ _scratch_mkfs_xfs > /dev/null
 
 echo "+ mount fs image"
 _scratch_mount
-dblksz="$(xfs_info "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
+dblksz="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
 nr="$((128 * dblksz / 40))"
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 leaf_lblk="$((32 * 1073741824 / blksz))"
index 60597fb..863581d 100755 (executable)
@@ -68,7 +68,7 @@ _scratch_cycle_mount
 echo "Create more reflink copies"
 _cp_reflink $testdir/original $testdir/copy3
 
-xfs_info $SCRATCH_MNT >> $seqres.full
+$XFS_INFO_PROG $SCRATCH_MNT >> $seqres.full
 
 # success, all done
 status=0
index a9e0ff4..71df9bb 100755 (executable)
@@ -58,7 +58,7 @@ _scratch_mkfs_xfs > /dev/null
 echo "+ mount fs image"
 _scratch_mount
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
-agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
+agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
 
 echo "+ make some files"
 _pwrite_byte 0x62 0 $((blksz * 64)) "${SCRATCH_MNT}/file0" >> "$seqres.full"
index d688216..251b728 100755 (executable)
@@ -54,7 +54,7 @@ _supported_os Linux
 _require_scratch
 _scratch_mkfs_xfs >/dev/null 2>&1
 _scratch_mount
-fsblocksize=`xfs_info $SCRATCH_MNT|sed 's/=/ /g'|awk '/^data / { print $3 }'`
+fsblocksize=`$XFS_INFO_PROG $SCRATCH_MNT|sed 's/=/ /g'|awk '/^data / { print $3 }'`
 
 dd if=/dev/zero of=$SCRATCH_MNT/$filename bs=1024k count=10 >> $seqres.full 2>&1
 
index d5edf1a..91467e9 100755 (executable)
@@ -104,7 +104,7 @@ xfs_growfs $tmpdir  | mkfs_filter
 
 # and double-check the new geometry
 echo "=== xfs_info ==="
-xfs_info $tmpdir | mkfs_filter
+$XFS_INFO_PROG $tmpdir | mkfs_filter
 
 # _cleanup cleans up for us
 
index b20dd4f..9e7d3b3 100755 (executable)
@@ -66,7 +66,7 @@ _scratch_cycle_mount
 echo "Create more copies"
 cp -p $testdir/original $testdir/copy3
 
-xfs_info $SCRATCH_MNT >> $seqres.full
+$XFS_INFO_PROG $SCRATCH_MNT >> $seqres.full
 
 # success, all done
 status=0
index 84725b0..f7d75e7 100755 (executable)
@@ -56,7 +56,7 @@ _scratch_mkfs_xfs > /dev/null
 echo "+ mount fs image"
 _scratch_mount
 blksz=$(stat -f -c '%s' ${SCRATCH_MNT})
-agcount=$(xfs_info ${SCRATCH_MNT} | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')
+agcount=$($XFS_INFO_PROG ${SCRATCH_MNT} | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')
 
 echo "+ make some files"
 _pwrite_byte 0x62 0 $((blksz * 64)) ${SCRATCH_MNT}/file0 >> $seqres.full
index 156cfae..d82b19b 100755 (executable)
@@ -51,7 +51,7 @@ echo "Format and mount"
 _scratch_mkfs > "$seqres.full" 2>&1
 _scratch_mount
 
-agcount=$(xfs_info $SCRATCH_MNT | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')
+agcount=$($XFS_INFO_PROG $SCRATCH_MNT | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')
 
 echo "Get fsmap" | tee -a $seqres.full
 $XFS_IO_PROG -c 'fsmap -v' $SCRATCH_MNT > $TEST_DIR/fsmap
index d829524..4d88fcc 100755 (executable)
@@ -52,7 +52,7 @@ rm -f $seqres.full
 echo "Format"
 _scratch_mkfs > $seqres.full 2>&1
 _scratch_mount >> $seqres.full
-is_rmap=$(xfs_info $SCRATCH_MNT | grep -c "rmapbt=1")
+is_rmap=$($XFS_INFO_PROG $SCRATCH_MNT | grep -c "rmapbt=1")
 _scratch_unmount
 
 _get_agf_data() {
index 7e7adac..3d346ec 100755 (executable)
@@ -52,7 +52,7 @@ rm -f $seqres.full
 echo "Format"
 _scratch_mkfs > $seqres.full 2>&1
 _scratch_mount >> $seqres.full
-is_rmap=$(xfs_info $SCRATCH_MNT | grep -c "rmapbt=1")
+is_rmap=$($XFS_INFO_PROG $SCRATCH_MNT | grep -c "rmapbt=1")
 _scratch_unmount
 
 _get_agf_data() {
index f7b7e30..f655693 100755 (executable)
@@ -67,7 +67,7 @@ sectors=$(( (nr_blks * 3) * blksz / 512 )) # each AG must have > 2^21 blocks
 _dmhugedisk_init $sectors
 _mkfs_dev -d agcount=2 $DMHUGEDISK_DEV
 _mount $DMHUGEDISK_DEV $SCRATCH_MNT
-xfs_info $SCRATCH_MNT >> $seqres.full
+$XFS_INFO_PROG $SCRATCH_MNT >> $seqres.full
 
 echo "Create the original file blocks"
 mkdir $testdir
index 9d3bcb2..4702629 100755 (executable)
@@ -70,7 +70,7 @@ mknod $testdir/CHRDEV c 1 1
 mknod $testdir/BLKDEV b 1 1
 mknod $testdir/FIFO p
 
-xfs_info $SCRATCH_MNT | grep -q "ftype=1" && FTYPE_FEATURE=1
+$XFS_INFO_PROG $SCRATCH_MNT | grep -q "ftype=1" && FTYPE_FEATURE=1
 
 # Record test dir inode for xfs_repair filter
 inode_filter=$tmp.sed