Whamcloud - gitweb
LU-4578 ptlrpc: Early replies need to honor at_max
[fs/lustre-release.git] / lustre / ptlrpc / client.c
index a543788..3f3e220 100644 (file)
@@ -374,9 +374,11 @@ static int ptlrpc_at_recv_early_reply(struct ptlrpc_request *req)
 
        spin_lock(&req->rq_lock);
        olddl = req->rq_deadline;
-       /* server assumes it now has rq_timeout from when it sent the
-        * early reply, so client should give it at least that long. */
-       req->rq_deadline = cfs_time_current_sec() + req->rq_timeout +
+       /* server assumes it now has rq_timeout from when the request
+        * arrived, so the client should give it at least that long.
+        * since we don't know the arrival time we'll use the original
+        * sent time */
+       req->rq_deadline = req->rq_sent + req->rq_timeout +
                           ptlrpc_at_get_net_latency(req);
 
        DEBUG_REQ(D_ADAPTTO, req,