r=shaver
- Make sure that all locks which have been marked as receiving a blocking AST
are eventually added to the waiting list, to evict badly-behaving clients.
- If a service node times out waiting for a lock, dump the namespace
to the log, no more than once every 5 minutes
/* We never send a blocking AST until the lock is granted, but
* we can tell it right now */
l_lock(&lock->l_resource->lr_namespace->ns_lock);
- if (lock->l_flags & LDLM_FL_AST_SENT)
+ if (lock->l_flags & LDLM_FL_AST_SENT) {
dlm_rep->lock_flags |= LDLM_FL_AST_SENT;
+ if (lock->l_granted_mode == lock->l_req_mode)
+ ldlm_add_waiting_lock(lock);
+ }
l_unlock(&lock->l_resource->lr_namespace->ns_lock);
EXIT;
int ldlm_expired_completion_wait(void *data)
{
+ static unsigned long next_dump = 0;
struct lock_wait_data *lwd = data;
struct ldlm_lock *lock = lwd->lwd_lock;
struct obd_import *imp;
LDLM_ERROR(lock, "lock timed out, entering recovery for %s@%s",
imp->imp_target_uuid.uuid,
imp->imp_connection->c_remote_uuid.uuid);
+ if (time_after(jiffies, next_dump)) {
+ next_dump = jiffies + 300 * HZ;
+ ldlm_namespace_dump(lock->l_resource->lr_namespace);
+ }
RETURN(0);
}