From c598d969f3cff8b6ec4f6ff4f09afd179734afa4 Mon Sep 17 00:00:00 2001 From: johann Date: Wed, 5 Nov 2008 11:11:34 +0000 Subject: [PATCH] Branch b1_8_gate b=16860 i=nathan i=rread Description: Excessive recovery window Details : With AT enabled, the recovery window can be excessively long (6000+ seconds). To address this problem, we no longer use OBD_RECOVERY_FACTOR when extending the recovery window (the connect timeout no longer depends on the service time, it is set to INITIAL_CONNECT_TIMEOUT now) and clients report the old service time via pb_service_time. --- lustre/ptlrpc/import.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index e992c52..3e85081 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -539,6 +539,19 @@ int ptlrpc_connect_import(struct obd_import *imp, char *new_uuid) if (!request) GOTO(out, rc = -ENOMEM); + /* Report the rpc service time to the server so that it knows how long + * to wait for clients to join recovery */ + lustre_msg_set_service_time(request->rq_reqmsg, + at_timeout2est(request->rq_timeout)); + + /* The amount of time we give the server to process the connect req. + * import_select_connection will increase the net latency on + * repeated reconnect attempts to cover slow networks. + * We override/ignore the server rpc completion estimate here, + * which may be large if this is a reconnect attempt */ + request->rq_timeout = INITIAL_CONNECT_TIMEOUT; + lustre_msg_set_timeout(request->rq_reqmsg, request->rq_timeout); + #ifndef __KERNEL__ lustre_msg_add_op_flags(request->rq_reqmsg, MSG_CONNECT_LIBCLIENT); #endif @@ -563,10 +576,6 @@ int ptlrpc_connect_import(struct obd_import *imp, char *new_uuid) spin_lock(&imp->imp_lock); imp->imp_replayable = 1; spin_unlock(&imp->imp_lock); - if (AT_OFF) - /* AT will use INITIAL_CONNECT_TIMEOUT the first - time, adaptive after that. */ - request->rq_timeout = INITIAL_CONNECT_TIMEOUT; } DEBUG_REQ(D_RPCTRACE, request, "%sconnect request %d", -- 1.8.3.1