BC=$(which bc 2> /dev/null) || BC=
-# Some tests are not relevant or functional when testing XFS realtime
-# subvolumes along with the rtinherit=1 mkfs option. In these cases,
-# this test will opt-out of the test.
-_require_no_rtinherit()
-{
- [ "$FSTYP" = "xfs" ] && echo "$MKFS_OPTIONS" |
- egrep -q "rtinherit([^=]|=1|$)" && \
- _notrun "rtinherit mkfs option is not supported by this test."
-}
-
_require_math()
{
if [ -z "$BC" ]; then
local params="$*"
local last_index=$(( $# - 1 ))
- #get mount point to handle dmapi mtpt option correctly
[ $last_index -gt 0 ] && shift $last_index
local fs_escaped=$1
- echo $params | sed -e 's/dmapi/dmi/' \
- | $PERL_PROG -ne "s#mtpt=[^,|^\n|^\s]*#mtpt=$fs_escaped\1\2#; print;"
+ echo $params | \
+ $PERL_PROG -ne "s#mtpt=[^,|^\n|^\s]*#mtpt=$fs_escaped\1\2#; print;"
}
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
options="-l $SCRATCH_LOGDEV"
- xfs_metadump $options "$@" $SCRATCH_DEV $dumpfile
+ $XFS_METADUMP_PROG $options "$@" $SCRATCH_DEV $dumpfile
}
_setup_large_ext4_fs()
case $FSTYP in
xfs)
if echo "$MKFS_OPTIONS" | egrep -q "b?size="; then
- MKFS_OPTIONS=$(echo "$MKFS_OPTIONS" | sed -r "s/(b?size=)[0-9]+/\1$blocksize/")
+ MKFS_OPTIONS=$(echo "$MKFS_OPTIONS" | sed -r "s/(b?size=)[0-9]+k?/\1$blocksize/")
else
MKFS_OPTIONS+=" -b size=$blocksize"
fi
_require_sane_bdev_flush $SCRATCH_DEV
_require_command "$DMSETUP_PROG" dmsetup
- _normalize_mount_options | egrep -q "dax(=always| |$)"
+ _normalize_mount_options | egrep -q "dax(=always| |$)" || \
+ test -e "/sys/block/$(_short_dev $SCRATCH_DEV)/dax"
if [ $? -eq 0 ]; then
case $target in
stripe|linear|log-writes)