if [[ $(uname -m) = aarch64 ]]; then
# bug number: LU-11596
ALWAYS_EXCEPT+=" $GRANT_CHECK_LIST"
- # bug number: LU-11671 LU-11667 LU-4398
- ALWAYS_EXCEPT+=" 45 317 817"
+ # bug number: LU-11671 LU-11667
+ ALWAYS_EXCEPT+=" 45 317"
+fi
+
+# skip nfs tests on kernels >= 4.14.0 until they are fixed
+if [ $LINUX_VERSION_CODE -ge $(version_code 4.14.0) ];then
+ # bug number: LU-12661
+ ALWAYS_EXCEPT+=" 817"
fi
# 5 12 (min)"
[ $PARALLEL == "yes" ] && skip "skip parallel run"
remote_ost_nodsh && skip "remote OST with nodsh"
- # get ost1 size - lustre-OST0000
+ # get ost1 size - $FSNAME-OST0000
ost1_size=$(do_facet ost1 $LFS df | grep ${ost1_svc} |
awk '{ print $4 }')
# write 800M at maximum
local dir3=$MOUNT/$tdir-3
mkdir $dir3 || error "mkdir $dir3 failed"
- ! getfattr -n trusted.lov $dir3 &> /dev/null ||
- error "$dir3 shouldn't have LOV EA"
+ # $dir3 shouldn't have LOV EA, but "lfs getstripe -d $dir3" should show
+ # the root layout, which is the actual default layout that will be used
+ # when new files are created in $dir3.
+ local dir3_layout=$(get_layout_param $dir3)
+ local root_dir_layout=$(get_layout_param $MOUNT)
+ [[ "$dir3_layout" = "$root_dir_layout" ]] ||
+ error "$dir3 should show the default layout from $MOUNT"
# set OST pool on root directory
local pool=$TESTNAME
local dir4=$MOUNT/$tdir-4
mkdir $dir4 || error "mkdir $dir4 failed"
- ! getfattr -n trusted.lov $dir4 &> /dev/null ||
- error "$dir4 shouldn't have LOV EA"
+ local dir4_layout=$(get_layout_param $dir4)
+ root_dir_layout=$(get_layout_param $MOUNT)
+ echo "$LFS getstripe -d $dir4"
+ $LFS getstripe -d $dir4
+ echo "$LFS getstripe -d $MOUNT"
+ $LFS getstripe -d $MOUNT
+ [[ "$dir4_layout" = "$root_dir_layout" ]] ||
+ error "$dir4 should show the default layout from $MOUNT"
# new file created in $dir4 should inherit the pool from
# the filesystem default
local dir5=$dir4/$tdir-5
mkdir $dir5 || error "mkdir $dir5 failed"
- local dir4_layout=$(get_layout_param $dir4)
+ dir4_layout=$(get_layout_param $dir4)
local dir5_layout=$(get_layout_param $dir5)
[[ "$dir4_layout" = "$dir5_layout" ]] ||
error "$dir5 should inherit the default layout from $dir4"
[ $PARALLEL == "yes" ] && skip "skip parallel run"
# 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" ] &&
- [ "$ost1_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
+ if [ "$ost1_FSTYPE" != "ldiskfs" ]; then
+ local soc="obdfilter.*.sync_lock_cancel"
+ local save=$(do_facet ost1 $LCTL get_param -n $soc | head -n1)
- dd if=/dev/zero of=$DIR/$tfile bs=1M count=1 seek=1M
- sync; sleep 1; sync
- local BEFORE=`date +%s`
- cancel_lru_locks osc
- local AFTER=`date +%s`
- local DIFF=$((AFTER-BEFORE))
- if [ $DIFF -gt 1 ] ; then
- error "elapsed for 1M@1T = $DIFF"
- fi
+ # "sync_on_lock_cancel" was broken by v2_11_55_0-26-g7059644e9a
+ if [ -z "$save" ]; then
+ soc="obdfilter.*.sync_on_lock_cancel"
+ save=$(do_facet ost1 $LCTL get_param -n $soc | head -n1)
+ fi
- [ -n "$hosts" ] && do_nodes $hosts lctl set_param $soc=$soc_old
+ if [ "$save" != "never" ]; then
+ local hosts=$(comma_list $(osts_nodes))
- rm -f $DIR/$tfile
+ do_nodes $hosts $LCTL set_param $soc=never
+ stack_trap "do_nodes $hosts $LCTL set_param $soc=$save"
+ fi
+ fi
+
+ dd if=/dev/zero of=$DIR/$tfile bs=1M count=1 seek=1M
+ sync; sleep 1; sync
+ local before=$(date +%s)
+ cancel_lru_locks osc
+ local after=$(date +%s)
+ local diff=$((after - before))
+ [ $diff -le 1 ] || error "elapsed for 1M@1T = $diff"
+
+ rm -f $DIR/$tfile
}
-run_test 80 "Page eviction is equally fast at high offsets too ===="
+run_test 80 "Page eviction is equally fast at high offsets too"
test_81a() { # LU-456
[ $PARALLEL == "yes" ] && skip "skip parallel run"
# this test needs a huge transaction
local kb
- kb=$(do_facet $SINGLEMDS lctl get_param -n osd*.lustre-MDT0000.kbytestotal)
- [ $kb -lt $((1024*1024)) ] && skip "too small mds: $kb"
+ kb=$(do_facet $SINGLEMDS "$LCTL get_param -n \
+ osd*.$FSNAME-MDT0000.kbytestotal")
+ [ $kb -lt $((1024*1024)) ] && skip "MDT0 too small: $kb"
local stripe_count
local file
$LFS setstripe -c 1 -i 0 $DIR/$tfile
- # get ost1 size - lustre-OST0000
+ # get ost1 size - $FSNAME-OST0000
local ost1_avail_size=$($LFS df | awk /${ost1_svc}/'{ print $4 }')
local blocks=$((ost1_avail_size/2/1024)) # half avail space by megabytes
[ $blocks -gt 1000 ] && blocks=1000 # 1G in maximum
lmv.*.qos_maxage=$lmv_qos_maxage > /dev/null" EXIT
lod_qos_prio_free=$(do_facet mds1 $LCTL get_param -n \
- lod.lustre-MDT0000-mdtlov.mdt_qos_prio_free | head -n1)
+ lod.$FSNAME-MDT0000-mdtlov.mdt_qos_prio_free | head -n1)
lod_qos_prio_free=${lod_qos_prio_free%%%}
lod_qos_threshold_rr=$(do_facet mds1 $LCTL get_param -n \
- lod.lustre-MDT0000-mdtlov.mdt_qos_threshold_rr | head -n1)
+ lod.$FSNAME-MDT0000-mdtlov.mdt_qos_threshold_rr | head -n1)
lod_qos_threshold_rr=${lod_qos_threshold_rr%%%}
lod_qos_maxage=$(do_facet mds1 $LCTL get_param -n \
- lod.lustre-MDT0000-mdtlov.qos_maxage | awk '{ print $1 }')
+ lod.$FSNAME-MDT0000-mdtlov.qos_maxage | awk '{ print $1 }')
stack_trap "do_nodes $mdts $LCTL set_param \
lod.*.mdt_qos_prio_free=$lod_qos_prio_free > /dev/null" EXIT
stack_trap "do_nodes $mdts $LCTL set_param \
local usedkb
local old
local quota
- local pref="osd-zfs.lustre-MDT0000."
+ local pref="osd-zfs.$FSNAME-MDT0000."
# limit available space on MDS dataset to meet nospace issue
# quickly. then ZFS 0.7.2 can use reserved space if asked