# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
# with LOD/OSP landing
-# bug number for skipped tests: LU2036
+# bug number for skipped tests: LU-2036
ALWAYS_EXCEPT=" 76 $ALWAYS_EXCEPT"
test_57a() {
# note test will not do anything if MDS is not local
- if [ "$(facet_type_fstype MDS)" != ldiskfs ]; then
+ if [ "$(facet_fstype $SINGLEMDS)" != ldiskfs ]; then
skip "Only applicable to ldiskfs-based MDTs"
return
fi
run_test 57a "verify MDS filesystem created with large inodes =="
test_57b() {
- if [ "$(facet_type_fstype MDS)" != ldiskfs ]; then
+ if [ "$(facet_fstype $SINGLEMDS)" != ldiskfs ]; then
skip "Only applicable to ldiskfs-based MDTs"
return
fi
run_test 79 "df report consistency check ======================="
test_80() { # bug 10718
+ # relax strong synchronous semantics for slow backends like ZFS
+ local soc="obdfilter.*.sync_on_lock_cancel"
+ local soc_old=$(do_facet ost1 lctl get_param -n $soc | head -n1)
+ local hosts=
+ if [ "$soc_old" != "never" -a "$FSTYPE" != "ldiskfs" ]; then
+ hosts=$(for host in $(seq -f "ost%g" 1 $OSTCOUNT); do
+ facet_active_host $host; done | sort -u)
+ do_nodes $hosts lctl set_param $soc=never
+ fi
+
dd if=/dev/zero of=$DIR/$tfile bs=1M count=1 seek=1M
sync; sleep 1; sync
local BEFORE=`date +%s`
if [ $DIFF -gt 1 ] ; then
error "elapsed for 1M@1T = $DIFF"
fi
+
+ [ -n "$hosts" ] && do_nodes $hosts lctl set_param $soc=$soc_old
+
true
rm -f $DIR/$tfile
}
remote_ost_nodsh && skip "remote OST with nodsh" && return
# define OBD_FAIL_OST_MAPBLK_ENOSPC 0x228
# MUST OR with the OBD_FAIL_ONCE (0x80000000)
- do_facet ost0 lctl set_param fail_loc=0x80000228
+ do_facet ost1 lctl set_param fail_loc=0x80000228
# write should trigger a retry and success
$SETSTRIPE -i 0 -c 1 $DIR/$tfile
remote_ost_nodsh && skip "remote OST with nodsh" && return
# define OBD_FAIL_OST_MAPBLK_ENOSPC 0x228
# Don't OR with the OBD_FAIL_ONCE (0x80000000)
- do_facet ost0 lctl set_param fail_loc=0x228
+ do_facet ost1 lctl set_param fail_loc=0x228
# write should retry several times and return -ENOSPC finally
$SETSTRIPE -i 0 -c 1 $DIR/$tfile
{ skip "Need free space ${size}M, have $space" && return; }
echo Creating ${size}M test file $file
- dd if=/dev/zero of=$file bs=1M count=$size
+ dd if=/dev/zero of=$file bs=1M count=$size || error "dd failed"
echo Cancel LRU locks on lustre client to flush the client cache
cancel_lru_locks osc
echo Max free space: OST $MAXI: $MAXV
}
-test_116() {
+test_116a() { # was previously test_116()
[ "$OSTCOUNT" -lt "2" ] && skip_env "$OSTCOUNT < 2 OSTs" && return
echo -n "Free space priority "
rm -rf $DIR/$tdir
}
-run_test 116 "stripe QOS: free space balance ==================="
+run_test 116a "stripe QOS: free space balance ==================="
+
+test_116b() { # LU-2093
+#define OBD_FAIL_MDS_OSC_CREATE_FAIL 0x147
+ local old_rr
+ old_rr=$(do_facet $SINGLEMDS lctl get_param -n lov.*mdtlov*.qos_threshold_rr)
+ do_facet $SINGLEMDS lctl set_param lov.*mdtlov*.qos_threshold_rr 0
+ mkdir -p $DIR/$tdir
+ do_facet $SINGLEMDS lctl set_param fail_loc=0x147
+ createmany -o $DIR/$tdir/f- 20 || error "can't create"
+ do_facet $SINGLEMDS lctl set_param fail_loc=0
+ rm -rf $DIR/$tdir
+ do_facet $SINGLEMDS lctl set_param lov.*mdtlov*.qos_threshold_rr $old_rr
+}
+run_test 116b "QoS shouldn't LBUG if not enough OSTs found on the 2nd pass"
test_117() # bug 10891
{
done
}
test_129() {
- if [ "$(facet_type_fstype MDS)" != ldiskfs ]; then
+ if [ "$(facet_fstype $SINGLEMDS)" != ldiskfs ]; then
skip "Only applicable to ldiskfs-based MDTs"
return
fi
# clear old jobstats
do_facet $SINGLEMDS lctl set_param mdt.*.job_stats="clear"
- do_facet ost0 lctl set_param obdfilter.*.job_stats="clear"
+ do_facet ost1 lctl set_param obdfilter.*.job_stats="clear"
# use a new JobID for this test, or we might see an old one
[ "$JOBENV" = "FAKE_JOBID" ] && FAKE_JOBID=test_id.$testnum.$RANDOM
grep $JOBVAL || error "No job stats found on MDT $FACET"
fi
if [ "$target" = "ost" -o "$target" = "both" ]; then
- FACET=ost0
+ FACET=ost1
do_facet $FACET lctl get_param obdfilter.*.job_stats |
grep $JOBVAL || error "No job stats found on OST $FACET"
fi
}
run_test 900 "umount should not race with any mgc requeue thread"
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
if [ "$I_MOUNTED" != "yes" ]; then
lctl set_param debug="$OLDDEBUG" 2> /dev/null || true