Whamcloud - gitweb
Branch b1_8_gate
authorjohann <johann>
Wed, 5 Nov 2008 11:11:31 +0000 (11:11 +0000)
committerjohann <johann>
Wed, 5 Nov 2008 11:11:31 +0000 (11:11 +0000)
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/include/lustre_import.h

index 96d5f8b..3502518 100644 (file)
@@ -180,8 +180,8 @@ static inline unsigned int at_est2timeout(unsigned int val)
 
 static inline unsigned int at_timeout2est(unsigned int val)
 {
-        /* restore estimate value from timeout */
-        return ((val - 1) / 5 * 4);
+        /* restore estimate value from timeout: e=4/5(t-5) */
+        return (max((val << 2) / 5, 5U) - 4);
 }
 
 static inline void at_init(struct adaptive_timeout *at, int val, int flags) {