Whamcloud - gitweb
LU-13 updated patch to fix at_min issue
authorZhangHongChao <Hongchao.zhang@sun.com>
Tue, 31 Aug 2010 20:38:48 +0000 (13:38 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 4 Apr 2011 18:17:40 +0000 (11:17 -0700)
Also Bugzilla bug 23352, attachment 31479
This is already landed for 1.8.6.

Change-Id: I87db1f40401e1da9337eace5d3bd992bc64871a4
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/306
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
lustre/include/lustre_import.h

index 0e93bcc..e956755 100644 (file)
@@ -320,8 +320,9 @@ static inline void at_init(struct adaptive_timeout *at, int val, int flags) {
         at->at_flags = flags;
         cfs_spin_lock_init(&at->at_lock);
 }
         at->at_flags = flags;
         cfs_spin_lock_init(&at->at_lock);
 }
+extern unsigned int at_min;
 static inline int at_get(struct adaptive_timeout *at) {
 static inline int at_get(struct adaptive_timeout *at) {
-        return at->at_current;
+        return (at->at_current > at_min) ? at->at_current : at_min;
 }
 int at_measured(struct adaptive_timeout *at, unsigned int val);
 int import_at_get_index(struct obd_import *imp, int portal);
 }
 int at_measured(struct adaptive_timeout *at, unsigned int val);
 int import_at_get_index(struct obd_import *imp, int portal);