+test_93() {
+ local server_version=$(lustre_version_code $SINGLEMDS)
+ [[ $server_version -ge $(version_code 2.6.90) ]] ||
+ [[ $server_version -ge $(version_code 2.5.4) &&
+ $server_version -lt $(version_code 2.5.50) ]] ||
+ { skip "Need MDS version 2.5.4+ or 2.6.90+"; return; }
+
+ cancel_lru_locks osc
+
+ $SETSTRIPE -i 0 -c 1 $DIR/$tfile
+ dd if=/dev/zero of=$DIR/$tfile bs=1024 count=1
+#define OBD_FAIL_TGT_REPLAY_RECONNECT 0x715
+ # We need to emulate a state that OST is waiting for other clients
+ # not completing the recovery. Final ping is queued, but reply will be sent
+ # on the recovery completion. It is done by sleep before processing final
+ # pings
+ do_facet ost1 "$LCTL set_param fail_val=40"
+ do_facet ost1 "$LCTL set_param fail_loc=0x715"
+ fail ost1
+}
+run_test 93 "replay + reconnect"
+
+striped_dir_check_100() {
+ local striped_dir=$DIR/$tdir/striped_dir
+ local stripe_count=$($LFS getdirstripe -c $striped_dir)
+
+ $LFS getdirstripe $striped_dir
+ [ $stripe_count -eq 2 ] || error "$stripe_count != 2"
+
+ createmany -o $striped_dir/f-%d 20 ||
+ error "creation failed under striped dir"
+}
+
+test_100a() {
+ [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return 0
+ ([ $FAILURE_MODE == "HARD" ] &&
+ [ "$(facet_host mds1)" == "$(facet_host mds2)" ]) &&
+ skip "MDTs needs to be on diff hosts for HARD fail mode" &&
+ return 0
+
+ local striped_dir=$DIR/$tdir/striped_dir
+ local MDTIDX=1
+
+ mkdir $DIR/$tdir
+
+ #To make sure MDT1 and MDT0 are connected
+ #otherwise it may create single stripe dir here
+ $LFS setdirstripe -i1 $DIR/$tdir/remote_dir
+
+ #define OBD_FAIL_OUT_UPDATE_NET_REP 0x1701
+ do_facet mds$((MDTIDX+1)) lctl set_param fail_loc=0x1701
+ $LFS setdirstripe -i0 -c2 $striped_dir &
+ local CLIENT_PID=$!
+
+ fail mds$((MDTIDX + 1))
+
+ wait $CLIENT_PID || error "striped dir creation failed"
+
+ striped_dir_check_100 || error "striped dir check failed"
+ rm -rf $DIR/$tdir || error "rmdir failed"
+}
+run_test 100a "DNE: create striped dir, drop update rep from MDT1, fail MDT1"
+
+test_100b() {
+ [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return 0
+ ([ $FAILURE_MODE == "HARD" ] &&
+ [ "$(facet_host mds1)" == "$(facet_host mds2)" ]) &&
+ skip "MDTs needs to be on diff hosts for HARD fail mode" &&
+ return 0
+
+ local striped_dir=$DIR/$tdir/striped_dir
+ local MDTIDX=1
+
+ mkdir $DIR/$tdir
+
+ #To make sure MDT1 and MDT0 are connected
+ #otherwise it may create single stripe dir here
+ $LFS setdirstripe -i1 $DIR/$tdir/remote_dir
+
+ # OBD_FAIL_MDS_REINT_NET_REP 0x119
+ do_facet mds$MDTIDX lctl set_param fail_loc=0x119
+ $LFS mkdir -i0 -c2 $striped_dir &
+
+ local CLIENT_PID=$!
+ fail mds$MDTIDX
+
+ wait $CLIENT_PID || error "striped dir creation failed"
+
+ striped_dir_check_100 || error "striped dir check failed"
+ rm -rf $DIR/$tdir || error "rmdir failed"
+}
+run_test 100b "DNE: create striped dir, fail MDT0"
+
+test_101() { #LU-5648
+ mkdir -p $DIR/$tdir/d1
+ mkdir -p $DIR/$tdir/d2
+ touch $DIR/$tdir/file0
+ num=1000
+
+ replay_barrier $SINGLEMDS
+ for i in $(seq $num) ; do
+ echo test$i > $DIR/$tdir/d1/file$i
+ done
+
+ fail_abort $SINGLEMDS
+ for i in $(seq $num) ; do
+ touch $DIR/$tdir/d2/file$i
+ test -s $DIR/$tdir/d2/file$i &&
+ ls -al $DIR/$tdir/d2/file$i && error "file$i's size > 0"
+ done
+
+ rm -rf $DIR/$tdir
+}
+run_test 101 "Shouldn't reassign precreated objs to other files after recovery"
+