# 1 2.5 2.5 4 4 (min)"
[ "$SLOW" = "no" ] && EXCEPT_SLOW="17 26a 26b 50 51 57"
+[ $(facet_fstype $SINGLEMDS) = "zfs" ] &&
+# bug number for skipped test: LU-2194 LU-2547
+ ALWAYS_EXCEPT="$ALWAYS_EXCEPT 19b 24a"
+
build_test_filter
# Allow us to override the setup if we already have a mounted system by
local BEFORE=`date +%s`
local EVICT
- mount_client $DIR2
+ mount_client $DIR2 || error "failed to mount $DIR2"
+
+ # cancel cached locks from OST to avoid eviction from it
+ cancel_lru_locks osc
- do_facet client "stat $DIR > /dev/null" || return 1
- drop_ldlm_cancel "chmod 0777 $DIR2"
+ do_facet client "stat $DIR > /dev/null" ||
+ error "failed to stat $DIR: $?"
+ drop_ldlm_cancel "chmod 0777 $DIR2" ||
+ error "failed to chmod $DIR2"
umount_client $DIR2
EVICT=$(do_facet client $LCTL get_param mdc.$FSNAME-MDT*.state | \
awk -F"[ [,]" '/EVICTED]$/ { if (mx<$4) {mx=$4;} } END { print mx }')
- [ ! -z "$EVICT" ] && [[ $EVICT -gt $BEFORE ]] || error "no eviction"
+ [ ! -z "$EVICT" ] && [[ $EVICT -gt $BEFORE ]] ||
+ (do_facet client $LCTL get_param mdc.$FSNAME-MDT*.state;
+ error "no eviction: $EVICT before:$BEFORE")
}
run_test 19a "test expired_lock_main on mds (2867)"
local BEFORE=`date +%s`
local EVICT
- mount_client $DIR2
+ mount_client $DIR2 || error "failed to mount $DIR2: $?"
- do_facet client $MULTIOP $DIR/$tfile Ow || return 1
- drop_ldlm_cancel $MULTIOP $DIR2/$tfile Ow
- umount_client $DIR2
- do_facet client munlink $DIR/$tfile
+ # cancel cached locks from MDT to avoid eviction from it
+ cancel_lru_locks mdc
+
+ do_facet client $MULTIOP $DIR/$tfile Ow ||
+ error "failed to run multiop: $?"
+ drop_ldlm_cancel $MULTIOP $DIR2/$tfile Ow ||
+ error "failed to ldlm_cancel: $?"
+
+ umount_client $DIR2 || error "failed to unmount $DIR2: $?"
+ do_facet client munlink $DIR/$tfile ||
+ error "failed to unlink $DIR/$tfile: $?"
# let the client reconnect
client_reconnect
EVICT=$(do_facet client $LCTL get_param osc.$FSNAME-OST*.state | \
awk -F"[ [,]" '/EVICTED]$/ { if (mx<$4) {mx=$4;} } END { print mx }')
- [ ! -z "$EVICT" ] && [[ $EVICT -gt $BEFORE ]] || error "no eviction"
+ [ ! -z "$EVICT" ] && [[ $EVICT -gt $BEFORE ]] ||
+ (do_facet client $LCTL get_param osc.$FSNAME-OST*.state;
+ error "no eviction: $EVICT before:$BEFORE")
}
run_test 19b "test expired_lock_main on ost (2867)"
test_24b() {
remote_ost_nodsh && skip "remote OST with nodsh" && return 0
- dmesg -c
+ dmesg -c > /dev/null
mkdir -p $DIR/$tdir
lfs setstripe $DIR/$tdir -s 0 -i 0 -c 1
cancel_lru_locks osc
# fail abort so client will be new again
fail_abort $SINGLEMDS
client_up || error "reconnect failed"
- wait_osc_import_state mds ost FULL
+ wait_osc_import_state $SINGLEMDS ost FULL
return 0
}
run_test 29a "error adding new clients doesn't cause LBUG (bug 22273)"
}
run_test 110f "remove remote directory: drop slave rep"
+# LU-2844 mdt prepare fail should not cause umount oops
+test_111 ()
+{
+ [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.3.62) ]] ||
+ { skip "Need MDS version at least 2.3.62"; return 0; }
+
+ local mdsdev=$(mdsdevname ${SINGLEMDS//mds/})
+#define OBD_FAIL_MDS_CHANGELOG_INIT 0x151
+ do_facet $SINGLEMDS lctl set_param fail_loc=0x151
+ stop $SINGLEMDS || error "stop MDS failed"
+ start $SINGLEMDS $mdsdev && error "start MDS should fail"
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
+ start $SINGLEMDS $mdsdev || error "start MDS failed"
+}
+run_test 111 "mdd setup fail should not cause umount oops"
+
complete $SECONDS
check_and_cleanup_lustre
exit_status