#define OBD_FAIL_OSP_RPCS_SEM 0x2104
#define OBD_FAIL_OSP_CANT_PROCESS_LLOG 0x2105
#define OBD_FAIL_OSP_INVALID_LOGID 0x2106
+#define OBD_FAIL_OSP_CON_EVENT_DELAY 0x2107
/* barrier */
#define OBD_FAIL_MGS_BARRIER_READ_NET 0x2200
case IMP_EVENT_ACTIVE:
d->opd_imp_active = 1;
- if (d->opd_got_disconnected)
- d->opd_new_connection = 1;
+ d->opd_new_connection = 1;
d->opd_imp_connected = 1;
d->opd_imp_seen_connected = 1;
d->opd_obd->obd_inactive = 0;
if (!d->opd_new_connection)
continue;
+ OBD_FAIL_TIMEOUT(OBD_FAIL_OSP_CON_EVENT_DELAY,
+ cfs_fail_val);
d->opd_new_connection = 0;
d->opd_got_disconnected = 0;
break;
}
run_test 100 "check lshowmount lists MGS, MDT, OST and 0@lo"
-test_101() {
+test_101a() {
local createmany_pid
local dev=$FSNAME-OST0000-osc-MDT0000
setup
unlinkmany $DIR1/$tdir/$tfile-%d 50000
cleanup
}
-run_test 101 "Race MDT->OST reconnection with create"
+run_test 101a "Race MDT->OST reconnection with create"
+
+test_101b () {
+ local dev=$FSNAME-OST0000-osc-MDT0000
+ local dir=$DIR1/$tdir
+ setup
+
+ mkdir $dir
+ $LFS setstripe -c 1 -i 0 $dir
+ do_facet $SINGLEMDS "$LCTL --device $dev deactivate;"
+#define OBD_FAIL_OSP_CON_EVENT_DELAY 0x2107
+ do_facet mds1 "$LCTL set_param fail_loc=0x80002107 fail_val=20"
+ do_facet $SINGLEMDS "$LCTL --device $dev activate;"
+ stop_ost
+ sleep 25
+ start_ost
+
+ wait_osc_import_state client ost1 FULL
+ touch $dir/$tfile || error "Can't create file"
+
+ cleanup
+}
+run_test 101b "Race events DISCONNECT and ACTIVE in osp"
test_102() {
[[ "$MDS1_VERSION" -gt $(version_code 2.9.53) ]] ||