static inline int cfs_fail_check_set(__u32 id, __u32 value, int set)
{
int ret = 0;
+
if (unlikely(CFS_FAIL_PRECHECK(id) &&
- (ret = __cfs_fail_check_set(id, value, set)))) {
- CERROR("*** cfs_fail_loc=%x ***\n", id);
- }
+ (ret = __cfs_fail_check_set(id, value, set))))
+ LCONSOLE_INFO("*** cfs_fail_loc=%x, val=%u***\n", id, value);
+
return ret;
}
"Lustre kernel debug subsystem mask");
EXPORT_SYMBOL(libcfs_subsystem_debug);
-unsigned int libcfs_debug = (D_EMERG | D_ERROR | D_WARNING | D_CONSOLE |
+unsigned int libcfs_debug = (D_CANTMASK |
D_NETERROR | D_HA | D_CONFIG | D_IOCTL);
CFS_MODULE_PARM(libcfs_debug, "i", int, 0644,
"Lustre kernel debug mask");
if (!Q_TYPESET(oqctl, i))
continue;
if (qinfo->qi_files[i] == NULL) {
- CWARN("quota[%d] is off already\n", i);
+ CDEBUG(D_QUOTA, "quota[%d] is off already\n", i);
rc = -EALREADY;
continue;
}
done
MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
MDSSIZE=${MDSSIZE:-200000}
-MDSOPT=${MDSOPT:-"--mountfsoptions=errors=remount-ro,user_xattr,acl"}
+MDSOPT=${MDSOPT:-"--mountfsoptions=user_xattr"}
MGSDEV=${MGSDEV:-$MDSDEV1}
MGSSIZE=${MGSSIZE:-$MDSSIZE}
STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
SINGLEMDS=${SINGLEMDS:-"mds1"}
TIMEOUT=${TIMEOUT:-20}
-PTLDEBUG=${PTLDEBUG:-0x33f0404}
+PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config ioctl super"}
+SUBSYSTEM=${SUBSYSTEM:-"all -lnet -lnd -pinger"}
# promise 2MB for every cpu
_debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2))
DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb}
-SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
-
ENABLE_QUOTA=${ENABLE_QUOTA:-""}
QUOTA_TYPE="ug3"
QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"}
OSTOPT=$OSTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`"
OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $OSTOPT $OST_MKFS_OPTS"
-MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"-o loop,user_xattr,acl"}
+MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"-o loop,user_xattr"}
OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-"-o loop"}
MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-$MDS_MOUNT_OPTS}
MOUNT=${MOUNT:-/mnt/${FSNAME}}
MOUNT1=${MOUNT1:-$MOUNT}
MOUNT2=${MOUNT2:-${MOUNT}2}
-MOUNTOPT=${MOUNTOPT:-"-o user_xattr,acl,flock"}
+MOUNTOPT=${MOUNTOPT:-"-o user_xattr,flock"}
DIR=${DIR:-$MOUNT}
DIR1=${DIR:-$MOUNT1}
DIR2=${DIR2:-$MOUNT2}
{ skip_env "Cannot untar $DISK1_8" && return 0; }
load_modules
- $LCTL set_param debug=$PTLDEBUG
+ $LCTL set_param debug="$PTLDEBUG"
$TUNEFS $tmpdir/mds || error "tunefs failed"
# mount lustre on mds
lustre_client=$(facet_active_host $SINGLEMDS)
zconf_mount_clients $lustre_client $MOUNT \
- "-o user_xattr,acl,flock,32bitapi" || \
+ "-o user_xattr,flock,32bitapi" || \
error "mount lustre on $lustre_client failed"
# setup the nfs
ALWAYS_EXCEPT=" 14b 19 22 28 29 35 $SANITYN_EXCEPT"
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-# bug number for skipped test: 12652 12652
-grep -q 'Enterprise Server 10' /etc/SuSE-release && ALWAYS_EXCEPT="$ALWAYS_EXCEPT 11 14" || true
+# bug number for skipped test: 12652 12652
+grep -q 'Enterprise Server 10' /etc/SuSE-release 2> /dev/null &&
+ ALWAYS_EXCEPT="$ALWAYS_EXCEPT 11 14" || true
# Tests that fail on uml
[ "$UML" = "true" ] && EXCEPT="$EXCEPT 7"
run_test 2e "check chmod on root is propagated to others"
test_3() {
- ( cd $DIR1 ; ln -s this/is/good $tfile )
- [ "this/is/good" = "`perl -e 'print readlink("'$DIR2/$tfile'");'`" ] ||
+ local target="this/is/good"
+ ln -s $target $DIR1/$tfile || error "ln -s $target $DIR1/$tfile failed"
+ [ "$(ls -l $DIR2/$tfile | sed -e 's/.* -> //')" = "$target" ] ||
error "link $DIR2/$tfile not as expected"
}
run_test 3 "symlink on one mtpt, readlink on another ==========="
run_test 12 "test lock ordering (link, stat, unlink) ==========="
test_13() { # bug 2451 - directory coherency
- rm -rf $DIR1/d13
mkdir $DIR1/d13 || error
cd $DIR1/d13 || error
ls
run_test 24b "lfs df should show both filesystems ==============="
test_25() {
- [ `lctl get_param -n mdc.*-mdc-*.connect_flags | grep -c acl` -lt 2 ] && \
- skip "must have acl, skipping" && return
+ [ `lctl get_param -n mdc.*-mdc-*.connect_flags | grep -c acl` -lt 2 ] &&
+ skip "must have acl, skipping" && return
mkdir -p $DIR1/$tdir
touch $DIR1/$tdir/f1 || error "touch $DIR1/$tdir/f1"
chmod 0755 $DIR1/$tdir/f1 || error "chmod 0755 $DIR1/$tdir/f1"
$RUNAS $CHECKSTAT $DIR2/$tdir/f1 || error "checkstat $DIR2/$tdir/f1 #1"
- setfacl -m u:$RUNAS_ID:--- -m g:$RUNAS_GID:--- $DIR1/$tdir || error "setfacl $DIR2/$tdir #1"
+ setfacl -m u:$RUNAS_ID:--- -m g:$RUNAS_GID:--- $DIR1/$tdir ||
+ error "setfacl $DIR2/$tdir #1"
$RUNAS $CHECKSTAT $DIR2/$tdir/f1 && error "checkstat $DIR2/$tdir/f1 #2"
- setfacl -m u:$RUNAS_ID:r-x -m g:$RUNAS_GID:r-x $DIR1/$tdir || error "setfacl $DIR2/$tdir #2"
+ setfacl -m u:$RUNAS_ID:r-x -m g:$RUNAS_GID:r-x $DIR1/$tdir ||
+ error "setfacl $DIR2/$tdir #2"
$RUNAS $CHECKSTAT $DIR2/$tdir/f1 || error "checkstat $DIR2/$tdir/f1 #3"
- setfacl -m u:$RUNAS_ID:--- -m g:$RUNAS_GID:--- $DIR1/$tdir || error "setfacl $DIR2/$tdir #3"
+ setfacl -m u:$RUNAS_ID:--- -m g:$RUNAS_GID:--- $DIR1/$tdir ||
+ error "setfacl $DIR2/$tdir #3"
$RUNAS $CHECKSTAT $DIR2/$tdir/f1 && error "checkstat $DIR2/$tdir/f1 #4"
- setfacl -x u:$RUNAS_ID: -x g:$RUNAS_GID: $DIR1/$tdir || error "setfacl $DIR2/$tdir #4"
+ setfacl -x u:$RUNAS_ID: -x g:$RUNAS_GID: $DIR1/$tdir ||
+ error "setfacl $DIR2/$tdir #4"
$RUNAS $CHECKSTAT $DIR2/$tdir/f1 || error "checkstat $DIR2/$tdir/f1 #5"
rm -rf $DIR1/$tdir
set_default_debug () {
local debug=${1:-"$PTLDEBUG"}
- local subsystem_debug=${2:-"$SUBSYSTEM"}
+ local subsys=${2:-"$SUBSYSTEM"}
local debug_size=${3:-$DEBUG_SIZE}
- lctl set_param debug="$debug"
- lctl set_param subsystem_debug="${subsystem_debug# }"
+ [ -n "$debug" ] && lctl set_param debug="$debug" >/dev/null
+ [ -n "$subsys" ] && lctl set_param subsystem_debug="${subsys# }" >/dev/null
- set_debug_size $debug_size
- sync
+ [ -n "$debug_size" ] && set_debug_size $debug_size > /dev/null
}
set_default_debug_nodes () {
do_nodes $clients "running=\\\$(grep -c $mnt' ' /proc/mounts);
if [ \\\$running -ne 0 ] ; then
echo Stopping client \\\$(hostname) $mnt opts:$force;
-lsof -t $mnt || need_kill=no;
+lsof $mnt || need_kill=no;
if [ "x$force" != "x" -a "x\\\$need_kill" != "xno" ]; then
pids=\\\$(lsof -t $mnt | sort -u);
if [ -n \\\"\\\$pids\\\" ]; then
kill -9 \\\$pids;
fi
fi;
-busy=\\\$(umount $force $mnt 2>&1 | grep -c "busy");
-if [ \\\$busy -ne 0 ] ; then
+while umount $force $mnt 2>&1 | grep -q "busy"; do
echo "$mnt is still busy, wait one second" && sleep 1;
- umount $force $mnt;
-fi
+done;
fi"
}
local RESULT
local WAIT=0
- local sleep=5
+ local sleep=1
+ local print=10
while [ true ]; do
RESULT=$(do_node $node "$TEST")
if [ "$RESULT" == "$FINAL" ]; then
return 0
fi
[ $WAIT -ge $MAX ] && break
- echo "Waiting $((MAX - WAIT)) secs for update"
+ [ $((WAIT % print)) -eq 0 ] &&
+ echo "Waiting $((MAX - WAIT)) secs for update"
WAIT=$((WAIT + sleep))
sleep $sleep
done