# bug number for skipped test: LU-2230
ALWAYS_EXCEPT="$ALWAYS_EXCEPT 21b"
-if $SHARED_KEY; then
-# bug number for skipped tests: LU-9795 LU-9795
- ALWAYS_EXCEPT+=" 0a 0b "
-fi
-
# 7 (min)"
[ "$SLOW" = "no" ] && EXCEPT_SLOW="21b "
do_facet client lctl set_param ldlm.namespaces.*.early_lock_cancel=0
do_facet client lctl set_param fail_loc=0x80000305 # drop cb, evict
cancel_lru_locks mdc
- usleep 500 # wait to ensure first client is one that will be evicted
+ sleep 0.1 # wait to ensure first client is one that will be evicted
openfile -f O_RDONLY $MOUNT2/$tdir/$tfile
wait $OPENPID
do_facet client lctl set_param ldlm.namespaces.*.early_lock_cancel=1
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
do_node $CLIENT1 $LFS mkdir -i $MDTIDX $MOUNT1/$remote_dir &
CLIENT_PID=$!
+ sleep 1
fail mds$((MDTIDX + 1))
wait $CLIENT_PID || error "lfs mkdir failed"
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
do_node $CLIENT1 $LFS mkdir -i $MDTIDX $MOUNT1/$remote_dir &
CLIENT_PID=$!
+ sleep 1
fail mds${MDTIDX},mds$((MDTIDX + 1))
wait $CLIENT_PID || error "lfs mkdir failed"
do_facet mds$MDTIDX lctl set_param fail_loc=0x1701
do_node $CLIENT1 $LFS mkdir -i $MDTIDX $MOUNT1/$remote_dir &
CLIENT_PID=$!
+ sleep 1
do_facet mds$MDTIDX lctl set_param fail_loc=0
fail mds$MDTIDX
do_facet mds$MDTIDX lctl set_param fail_loc=0x1701
do_node $CLIENT1 $LFS mkdir -i $MDTIDX $MOUNT1/$remote_dir &
CLIENT_PID=$!
+ sleep 1
do_facet mds$MDTIDX lctl set_param fail_loc=0
fail mds${MDTIDX},mds$((MDTIDX + 1))
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
do_node $CLIENT1 rmdir $MOUNT1/$remote_dir &
local CLIENT_PID=$!
+ sleep 1
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0
fail mds$((MDTIDX + 1))
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0x119
do_node $CLIENT1 rmdir $MOUNT1/$remote_dir &
local CLIENT_PID=$!
+ sleep 1
do_facet mds$((MDTIDX + 1)) lctl set_param fail_loc=0
fail mds${MDTIDX},mds$((MDTIDX + 1))
do_facet mds${MDTIDX} lctl set_param fail_loc=0x1701
do_node $CLIENT1 rmdir $MOUNT1/$remote_dir &
CLIENT_PID=$!
+ sleep 1
do_facet mds${MDTIDX} lctl set_param fail_loc=0
fail mds${MDTIDX}
do_facet mds${MDTIDX} lctl set_param fail_loc=0x1701
do_node $CLIENT1 rmdir $MOUNT1/$remote_dir &
CLIENT_PID=$!
+ sleep 1
do_facet mds${MDTIDX} lctl set_param fail_loc=0
fail mds${MDTIDX},mds$((MDTIDX + 1))
}
run_test 29 "replay vs update with the same xid"
+test_30() {
+ $LFS setstripe -E 1m -L mdt -E -1 $DIR/$tfile
+ #first write to have no problems with grants
+ dd if=/dev/zero of=$DIR/$tfile bs=4k count=10 ||
+ error "dd on client failed"
+ dd if=/dev/zero of=$DIR/$tfile bs=4k count=10 seek=10 ||
+ error "dd on client failed"
+
+ #define OBD_FAIL_LDLM_REPLAY_PAUSE 0x32e
+ lctl set_param fail_loc=0x32e fail_val=4
+ dd of=/dev/null if=$DIR2/$tfile &
+ local pid=$!
+ sleep 1
+
+ fail $SINGLEMDS
+
+ wait $pid || error "dd on client failed"
+}
+run_test 30 "layout lock replay is not blocked on IO"
+
complete $SECONDS
SLEEP=$((SECONDS - $NOW))
[ $SLEEP -lt $TIMEOUT ] && sleep $SLEEP