Whamcloud - gitweb
LU-1944 ldlm: Add another net_latency to recoverry timer.
[fs/lustre-release.git] / lustre / ldlm / ldlm_lib.c
index 3e3660f..a7ada1b 100644 (file)
@@ -1121,8 +1121,8 @@ dont_check_exports:
         cfs_spin_lock(&export->exp_lock);
         if (export->exp_conn_cnt >= lustre_msg_get_conn_cnt(req->rq_reqmsg)) {
                 cfs_spin_unlock(&export->exp_lock);
-                CDEBUG(D_RPCTRACE, "%s: %s already connected at higher "
-                       "conn_cnt: %d > %d\n",
+               CDEBUG(D_RPCTRACE, "%s: %s already connected at greater "
+                      "or equal conn_cnt: %d >= %d\n",
                        cluuid.uuid, libcfs_nid2str(req->rq_peer.nid),
                        export->exp_conn_cnt,
                        lustre_msg_get_conn_cnt(req->rq_reqmsg));
@@ -1237,13 +1237,13 @@ dont_check_exports:
          * ptlrpc_handle_server_req_in->lustre_unpack_msg() */
         revimp->imp_msg_magic = req->rq_reqmsg->lm_magic;
 
-        if ((export->exp_connect_flags & OBD_CONNECT_AT) &&
-            (revimp->imp_msg_magic != LUSTRE_MSG_MAGIC_V1))
-                revimp->imp_msghdr_flags |= MSGHDR_AT_SUPPORT;
-        else
-                revimp->imp_msghdr_flags &= ~MSGHDR_AT_SUPPORT;
+       if ((data->ocd_connect_flags & OBD_CONNECT_AT) &&
+           (revimp->imp_msg_magic != LUSTRE_MSG_MAGIC_V1))
+               revimp->imp_msghdr_flags |= MSGHDR_AT_SUPPORT;
+       else
+               revimp->imp_msghdr_flags &= ~MSGHDR_AT_SUPPORT;
 
-        if ((export->exp_connect_flags & OBD_CONNECT_FULL20) &&
+       if ((data->ocd_connect_flags & OBD_CONNECT_FULL20) &&
             (revimp->imp_msg_magic != LUSTRE_MSG_MAGIC_V1))
                 revimp->imp_msghdr_flags |= MSGHDR_CKSUM_INCOMPAT18;
         else
@@ -1958,8 +1958,11 @@ static int handle_recovery_req(struct ptlrpc_thread *thread,
                        to = max((int)at_est2timeout(
                                 at_get(&svcpt->scp_at_estimate)),
                                 (int)lustre_msg_get_timeout(req->rq_reqmsg));
-                        /* Add net_latency (see ptlrpc_replay_req) */
-                        to += lustre_msg_get_service_time(req->rq_reqmsg);
+                       /* Add 2 net_latency, one for balance rq_deadline
+                        * (see ptl_send_rpc), one for resend the req to server,
+                        * Note: client will pack net_latency in replay req
+                        * (see ptlrpc_replay_req) */
+                       to += 2 * lustre_msg_get_service_time(req->rq_reqmsg);
                 }
                 extend_recovery_timer(class_exp2obd(req->rq_export), to, true);
         }