Whamcloud - gitweb
LU-12949 obdclass: don't extend timer if obd stops
[fs/lustre-release.git] / lustre / ldlm / ldlm_lib.c
index 3ffe771..e94d72a 100644 (file)
@@ -1244,6 +1244,10 @@ int target_handle_connect(struct ptlrpc_request *req)
                rc = -EALREADY;
                class_export_put(export);
                export = NULL;
+       } else if (OBD_FAIL_PRECHECK(OBD_FAIL_TGT_RECOVERY_CONNECT) &&
+                  !lw_client) {
+               spin_unlock(&export->exp_lock);
+               rc = -EAGAIN;
        } else {
                export->exp_connecting = 1;
                spin_unlock(&export->exp_lock);
@@ -1830,7 +1834,8 @@ static void extend_recovery_timer(struct obd_device *obd, time_t dr_timeout,
        time_t left;
 
        spin_lock(&obd->obd_dev_lock);
-       if (!obd->obd_recovering || obd->obd_abort_recovery) {
+       if (!obd->obd_recovering || obd->obd_abort_recovery ||
+           obd->obd_stopping) {
                spin_unlock(&obd->obd_dev_lock);
                return;
        }
@@ -2328,7 +2333,7 @@ static int check_for_recovery_ready(struct lu_target *lut)
 
        if (lut->lut_tdtd != NULL) {
                if (!lut->lut_tdtd->tdtd_replay_ready &&
-                   !obd->obd_abort_recovery) {
+                   !obd->obd_abort_recovery && !obd->obd_stopping) {
                        /*
                         * Let's extend recovery timer, in case the recovery
                         * timer expired, and some clients got evicted