require_dsh_mds || exit 0
# also long tests: 19, 21a, 21e, 21f, 23, 27
-# 1 2.5 2.5 4 4 (min)"
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="17 26a 26b 50 51 57"
+
+[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
[ $(facet_fstype $SINGLEMDS) = "zfs" ] &&
# bug number for skipped test: LU-2547
#b=2494
test_12(){
- $LCTL mark $MULTIOP $DIR/$tfile OS_c
+ $LCTL mark "$HOSTNAME: $MULTIOP $DIR/$tfile OS_c"
do_facet $SINGLEMDS "lctl set_param fail_loc=0x115"
clear_failloc $SINGLEMDS $((TIMEOUT * 2)) &
multiop_bg_pause $DIR/$tfile OS_c ||
# Prevent interference from layout intent RPCs due to
# asynchronous writeback. These will be tested in 130c below.
- sync
+ do_nodes ${CLIENTS:-$HOSTNAME} sync
# get only LOOKUP lock on $tdir
cancel_lru_locks mdc
test_130c() {
remote_mds_nodsh && skip "remote MDS with nodsh" && return
- sync
+ do_nodes ${CLIENTS:-$HOSTNAME} sync
echo XXX > $DIR/$tfile
cancel_lru_locks mdc
}
run_test 130c "layout intent resend on a stale inode"
+test_132() {
+ local before=$(date +%s)
+ local evict
+
+ mount_client $MOUNT2 || error "mount filed"
+
+ rm -f $DIR/$tfile
+ # get a lock on client so that export would reach the stale list
+ $SETSTRIPE -i 0 $DIR/$tfile || error "setstripe failed"
+ dd if=/dev/zero of=$DIR/$tfile bs=4096 count=1 conv=fsync ||
+ error "dd failed"
+
+ #define OBD_FAIL_OST_PAUSE_PUNCH 0x236
+ do_facet ost1 $LCTL set_param fail_val=120 fail_loc=0x80000236
+
+ $TRUNCATE $DIR/$tfile 100 &
+
+ sleep 1
+ dd if=/dev/zero of=$DIR2/$tfile bs=4096 count=1 conv=notrunc ||
+ error "dd failed"
+
+ wait
+ umount_client $MOUNT2
+
+ evict=$(do_facet client $LCTL get_param \
+ osc.$FSNAME-OST0000-osc-*/state |
+ awk -F"[ [,]" '/EVICTED ]$/ { if (t<$5) {t=$5;} } END { print t }')
+
+ [ -z "$evict" ] || [[ $evict -le $before ]] ||
+ (do_facet client $LCTL get_param \
+ osc.$FSNAME-OST0000-osc-*/state;
+ error "eviction happened: $evict before:$before")
+}
+run_test 132 "long punch"
+
complete $SECONDS
check_and_cleanup_lustre
exit_status