awk '{sub("_UUID", "", $2); print $2;}')
#assume one client
mdccli=$($LCTL dl | grep "${mdtname}-mdc" | awk '{print $4;}')
- conn_uuid=$($LCTL get_param -n mdc.${mdccli}.mds_conn_uuid)
+ conn_uuid=$($LCTL get_param -n mdc.${mdccli}.conn_uuid)
mdcpath="mdc.${mdccli}.import=connection=${conn_uuid}"
drop_bl_callback_once "chmod 0777 ${workdir}" &
# test of open reconstruct
test_53() {
touch $DIR/$tfile
- drop_ldlm_reply "openfile -f O_RDWR:O_CREAT -m 0755 $DIR/$tfile" ||\
+ drop_mdt_ldlm_reply "openfile -f O_RDWR:O_CREAT -m 0755 $DIR/$tfile" ||\
return 2
}
run_test 53 "touch: drop rep"
#}
#run_test 62 "Verify connection flags race - bug LU-1716"
-test_66()
-{
- [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.7.51) ]] ||
- { skip "Need MDS version at least 2.7.51"; return 0; }
-
- local list=$(comma_list $(osts_nodes))
-
- # modify dir so that next revalidate would not obtain UPDATE lock
- touch $DIR
-
- # drop 1 reply with UPDATE lock
- mcreate $DIR/$tfile || error "mcreate failed: $?"
- drop_ldlm_reply_once "stat $DIR/$tfile" &
- sleep 2
-
- # make the re-sent lock to sleep
-#define OBD_FAIL_MDS_RESEND 0x136
- do_nodes $list $LCTL set_param fail_loc=0x80000136
-
- #initiate the re-connect & re-send
- local mdccli=$($LCTL dl | awk '/-mdc-/ {print $4;}')
- local conn_uuid=$($LCTL get_param -n mdc.${mdccli}.mds_conn_uuid)
- $LCTL set_param "mdc.${mdccli}.import=connection=${conn_uuid}"
- sleep 2
-
- #initiate the client eviction while enqueue re-send is in progress
- mds_evict_client
-
- client_reconnect
- wait
-}
-run_test 66 "lock enqueue re-send vs client eviction"
-
test_65() {
mount_client $DIR2
}
run_test 65 "lock enqueue for destroyed export"
+test_66()
+{
+ [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.7.51) ]] ||
+ { skip "Need MDS version at least 2.7.51"; return 0; }
+
+ local list=$(comma_list $(osts_nodes))
+
+ # modify dir so that next revalidate would not obtain UPDATE lock
+ touch $DIR
+
+ # drop 1 reply with UPDATE lock
+ mcreate $DIR/$tfile || error "mcreate failed: $?"
+ drop_mdt_ldlm_reply_once "stat $DIR/$tfile" &
+ sleep 2
+
+ # make the re-sent lock to sleep
+#define OBD_FAIL_MDS_RESEND 0x136
+ do_nodes $list $LCTL set_param fail_loc=0x80000136
+
+ #initiate the re-connect & re-send
+ local mdccli=$($LCTL dl | awk '/-MDT0000-mdc-/ {print $4;}')
+ local conn_uuid=$($LCTL get_param -n mdc.${mdccli}.conn_uuid)
+ $LCTL set_param "mdc.${mdccli}.import=connection=${conn_uuid}"
+ sleep 2
+
+ #initiate the client eviction while enqueue re-send is in progress
+ mds_evict_client
+
+ client_reconnect
+ wait
+}
+run_test 66 "lock enqueue re-send vs client eviction"
+
test_67()
{
#define OBD_FAIL_PTLRPC_CONNECT_RACE 0x531
# drop 1 reply with UPDATE lock,
# resend should not create 2nd lock on server
mcreate $DIR/$tfile || error "mcreate failed: $?"
- drop_ldlm_reply_once "stat $DIR/$tfile" || error "stat failed: $?"
+ drop_mdt_ldlm_reply_once "stat $DIR/$tfile" || error "stat failed: $?"
# 2 BL AST will be sent to client, both must find the same lock,
# race them to not get EINVAL for 2nd BL AST
multiop_bg_pause $DIR/$tfile O_jc || return 1
PID=$!
- #define OBD_FAIL_LDLM_REPLY 0x30c
- do_nodes $list $LCTL set_param fail_loc=0x8000030c
+ #define OBD_FAIL_MDS_LDLM_REPLY_NET 0x157
+ do_nodes $list $LCTL set_param fail_loc=0x80000157
kill -USR1 $PID
echo "waiting for multiop $PID"
wait $PID || return 2
return $rc
}
-drop_ldlm_reply() {
-#define OBD_FAIL_LDLM_REPLY 0x30c
+drop_mdt_ldlm_reply() {
+#define OBD_FAIL_MDS_LDLM_REPLY_NET 0x157
RC=0
- local list=$(comma_list $(mdts_nodes) $(osts_nodes))
- do_nodes $list lctl set_param fail_loc=0x30c
+ local list=$(comma_list $(mdts_nodes))
+ do_nodes $list lctl set_param fail_loc=0x157
do_facet client "$@" || RC=$?
return $RC
}
-drop_ldlm_reply_once() {
-#define OBD_FAIL_LDLM_REPLY 0x30c
+drop_mdt_ldlm_reply_once() {
+#define OBD_FAIL_MDS_LDLM_REPLY_NET 0x157
RC=0
- local list=$(comma_list $(mdts_nodes) $(osts_nodes))
- do_nodes $list lctl set_param fail_loc=0x8000030c
+ local list=$(comma_list $(mdts_nodes))
+ do_nodes $list lctl set_param fail_loc=0x80000157
do_facet client "$@" || RC=$?