From 549c2cbf3c7d5b2cec373b67887058c969032486 Mon Sep 17 00:00:00 2001
From: ericm <ericm>
Date: Tue, 17 Jun 2008 16:44:29 +0000
Subject: [PATCH] branch: b1_8 don't report service est. for MSG_ERR during
 recovery. b=15815 r=rread r=nathan

---
 lustre/ptlrpc/niobuf.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c
index 4c2f988057..99f3d8a0ae 100644
--- a/lustre/ptlrpc/niobuf.c
+++ b/lustre/ptlrpc/niobuf.c
@@ -360,8 +360,15 @@ int ptlrpc_send_reply (struct ptlrpc_request *req, int flags)
         }
         /* Report actual service time for client latency calc */
         lustre_msg_set_service_time(req->rq_repmsg, service_time);
-        /* Report service time estimate for future client reqs */
-        lustre_msg_set_timeout(req->rq_repmsg, at_get(&svc->srv_at_estimate));
+        /* Report service time estimate for future client reqs, but report 0
+         * (to be ignored by client) if it's a error reply during recovery.
+         * (bz15815) */
+        if (req->rq_type == PTL_RPC_MSG_ERR &&
+            (req->rq_export == NULL || req->rq_export->exp_obd->obd_recovering))
+                lustre_msg_set_timeout(req->rq_repmsg, 0);
+        else
+                lustre_msg_set_timeout(req->rq_repmsg,
+                                       at_get(&svc->srv_at_estimate));
 
         target_pack_pool_reply(req);
 
-- 
GitLab