##/bin/sh
#-----------------------------------------------------------------------
-# Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# Mountain View, CA 94043, USA, or: http://www.sgi.com
#-----------------------------------------------------------------------
+dd()
+{
+ if [ "$HOSTOS" == "Linux" ]
+ then
+ command dd --help | grep noxfer > /dev/null 2>&1
+
+ if [ "$?" -eq 0 ]
+ then
+ command dd status=noxfer $@
+ else
+ command dd $@
+ fi
+ else
+ command dd $@
+ fi
+}
+
_mount_opts()
{
case $FSTYP in
extra_rt_options="-r$3"
extra_mount_options=$extra_mount_options" -ortdev=$3"
fi
+ extra_mount_options=$extra_mount_options" $MOUNT_OPTIONS"
[ "$FSTYP" != xfs ] && return 0
testoption=""
#
_populate_fs()
{
-
here=`pwd`
dirs=5 # ndirs in each subdir till leaves
size=0 # sizeof files in K
esac
done
-
_descend $root $depth
wait
file=$2
if which $XFS_IO_PROG >/dev/null; then
- if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | fgrep -q "$flag" ; then
+ if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | grep -q "$flag" ; then
return 0
fi
fi
return 1
}
+# query the given files extsize allocator hint in bytes (if any)
+#
+_test_inode_extsz()
+{
+ file=$1
+ blocks=""
+
+ if which $XFS_IO_PROG >/dev/null; then
+ blocks=`$XFS_IO_PROG -r -c 'stat' "$file" | \
+ awk '/^xattr.extsize =/ { print $3 }'`
+ fi
+ [ -z "$blocks" ] && blocks="0"
+ echo $blocks
+}
+
################################################################################
fi
fi
- if [ "`_fs_type $TEST_DEV`" != "xfs" ]
+ if [ "`_fs_type $TEST_DEV`" != "$FSTYP" ]
then
- echo "common.rc: Error: \$TEST_DEV ($TEST_DEV) is not a MOUNTED XFS filesystem"
+ echo "common.rc: Error: \$TEST_DEV ($TEST_DEV) is not a MOUNTED $FSTYP filesystem"
$DF_PROG $TEST_DEV
exit 1
fi