Whamcloud - gitweb
Fix timeouts when evicting a client with a single lock held (from 1.0.4).
authoradilger <adilger>
Tue, 10 Feb 2004 00:07:02 +0000 (00:07 +0000)
committeradilger <adilger>
Tue, 10 Feb 2004 00:07:02 +0000 (00:07 +0000)
b=2642

lustre/ChangeLog
lustre/ldlm/ldlm_lockd.c

index 7fb431f..6ae01e8 100644 (file)
@@ -23,6 +23,8 @@ tbd         Cluster File Systems, Inc. <info@clusterfs.com>
        - fix ia64 OOPS in llog_test (2255)
        - zero end of page at obdfilter for partial page writes (2648)
        - don't leave stale dentries around after renames (bug 2428)
+       - fix timeouts when evicting a client with a single lock held (2642)
+       - set deadline for the initial HELLO message to drain (2634)
 
 2004-01-27  Cluster File Systems, Inc. <info@clusterfs.com>
        * version 1.0.3
index 85c98c4..877018a 100644 (file)
@@ -182,6 +182,17 @@ static void waiting_locks_callback(unsigned long unused)
                 wake_up(&expired_lock_thread.elt_waitq);
         }
 
+        /*
+         * Make sure the timer will fire again if we have any locks
+         * left.
+         */
+        if (!list_empty(&waiting_locks_list)) {
+                unsigned long timeout_rounded;
+                lock = list_entry(waiting_locks_list.next, struct ldlm_lock,
+                                  l_pending_chain);
+                timeout_rounded = round_timeout(lock->l_callback_timeout);
+                mod_timer(&waiting_locks_timer, timeout_rounded);
+        }
         spin_unlock_bh(&waiting_locks_spinlock);
 }
 
@@ -253,7 +264,11 @@ int ldlm_del_waiting_lock(struct ldlm_lock *lock)
                                   round_timeout(next->l_callback_timeout));
                 }
         }
+
+        spin_lock_bh(&expired_lock_thread.elt_lock);
         list_del_init(&lock->l_pending_chain);
+        spin_unlock_bh(&expired_lock_thread.elt_lock);
+
         spin_unlock_bh(&waiting_locks_spinlock);
         LDLM_DEBUG(lock, "removed");
         return 1;