Whamcloud - gitweb
LU-1944 ldlm: Add another net_latency to recoverry timer.
authorwangdi <di.wang@whamcloud.com>
Fri, 14 Sep 2012 14:39:21 +0000 (07:39 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 Nov 2012 17:08:09 +0000 (12:08 -0500)
Add another net_latency to this request deadline, i.e.
we need add 2 net_latency to extend the recovery timer,
one for balance rq_deadline (see ptl_send_rpc), one for
resend the req to server.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I6cb6e57358f4fe32ae2ac8d982af6ce03b68014b
Reviewed-on: http://review.whamcloud.com/4351
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_lib.c

index bba19e9..a7ada1b 100644 (file)
@@ -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);
         }