Whamcloud - gitweb
LU-5579 ldlm: re-sent enqueue vs lock destroy race
[fs/lustre-release.git] / lustre / tests / recovery-small.sh
index c11e009..d0c63b8 100755 (executable)
@@ -1284,6 +1284,36 @@ run_test 61 "Verify to not reuse orphan objects - bug 17025"
 #}
 #run_test 62 "Verify connection flags race - bug LU-1716"
 
+test_66()
+{
+       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
+       mdccli=$($LCTL dl | awk '/-mdc-/ {print $4;}')
+       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"
+
 check_cli_ir_state()
 {
         local NODE=${1:-$HOSTNAME}