dd if=/dev/zero of=$DIR/$tfile bs=4k count=10000 &
while [ ! -e $DIR/$tfile ] ; do
- usleep 60 # give dd a chance to start
+ sleep 0.01 # give dd a chance to start
done
$LFS getstripe $DIR/$tfile || error "$LFS getstripe $DIR/$tfile failed"
checkstat $DIR/$tfile
facet_failover $SINGLEMDS
cancel_lru_locks mdc
- if dmesg | grep "unknown lock cookie"; then
+ if $LCTL dk | grep "stale lock .*cookie"; then
error "cancel after replay failed"
fi
}
do_facet $SINGLEMDS dmesg -c >/dev/null
fail_abort $SINGLEMDS
kill -USR1 $pid || error "multiop $pid not running"
- do_facet $SINGLEMDS dmesg | grep "error .* unlinking .* from PENDING" &&
+ do_facet $SINGLEMDS dmesg | grep "error unlinking orphan" &&
error "error unlinking files"
wait $pid || error "multiop $pid failed"
sync
run_test 45 "Handle failed close"
test_46() {
- dmesg -c >/dev/null
drop_reply "touch $DIR/$tfile"
fail $SINGLEMDS
# ironically, the previous test, 45, will cause a real forced close,
# so just look for one for this test
- dmesg | grep -i "force closing client file handle for $tfile" &&
+ local FID=$($LFS path2fid $tfile)
+ $LCTL dk | grep -i "force closing file handle $FID" &&
error "found force closing in dmesg"
return 0
}
createmany -o $DIR/$tfile 10 > /dev/null
unlinkmany $DIR/$tfile 10 > /dev/null
# check for log message
- $LCTL dk | grep "Early reply #" || error "No early reply"
+ $LCTL dk | grep -i "Early reply #" || error "No early reply"
debugrestore
# client should show REQ_DELAY estimates
lctl get_param -n mdc.${FSNAME}-MDT0000-mdc-*.timeouts | grep portal
do_facet ost1 $LCTL set_param fail_loc=0
# check for log message
- $LCTL dk | grep "Early reply #" || error "No early reply"
+ $LCTL dk | grep -i "Early reply #" || error "No early reply"
debugrestore
# client should show REQ_DELAY estimates
lctl get_param -n osc.${FSNAME}-OST0000-osc-*.timeouts | grep portal
lctl set_param -n ldlm.cancel_unused_locks_before_replay "1"
- if ! combined_mgs_mds ; then
- mount_mgs_client
- fi
-
$LFS setstripe -c 1 -i 0 $DIR/$tdir
for i in $(seq 100); do
-n ldlm.namespaces.*OST0000*$addr.lock_unused_count)
echo "after recovery: unused locks count = $count2"
- if ! combined_mgs_mds ; then
- umount_mgs_client
- fi
-
if [ $count2 -ge $count ]; then
error "unused locks are not canceled"
fi
run_test 131b "DoM file write replay"
test_132a() {
- [ "$MDS1_VERSION" -lt $(version_code 2.9.90) ] &&
- skip "Do not support PFL files before 2.10"
+ [ "$MDS1_VERSION" -lt $(version_code 2.12.0) ] &&
+ skip "Need MDS version 2.12.0 or later"
$LFS setstripe -E 1M -c 1 -E EOF -c 2 $DIR/$tfile
replay_barrier $SINGLEMDS
pool_add pool_134
pool_add_targets pool_134 1 1
- mkdir $DIR/$tdir
- $LFS setstripe -p pool_134 $DIR/$tdir
+ mkdir -p $DIR/$tdir/{A,B}
+ $LFS setstripe -p pool_134 $DIR/$tdir/A
+ $LFS setstripe -E EOF -p pool_134 $DIR/$tdir/B
replay_barrier mds1
- touch $DIR/$tdir/$tfile
+ touch $DIR/$tdir/A/$tfile || error "touch non-pfl file failed"
+ touch $DIR/$tdir/B/$tfile || error "touch pfl failed"
fail mds1
- [ -f $DIR/$tdir/$tfile ] || error "file does not exist"
+ [ -f $DIR/$tdir/A/$tfile ] || error "non-pfl file does not exist"
+ [ -f $DIR/$tdir/B/$tfile ] || error "pfl file does not exist"
}
run_test 134 "replay creation of a file created in a pool"