From: pschwan Date: Fri, 18 Oct 2002 22:06:16 +0000 (+0000) Subject: I really broke the tree last night. I guess nobody has been using it much X-Git-Tag: v1_7_100~4479 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=ae32c62e20e776725cc27b63cdf9353ad9679ecc;p=fs%2Flustre-release.git I really broke the tree last night. I guess nobody has been using it much today. - Remove a bogus assertion in ldlm_completion_ast - Add a class 9 hack in ldlm_destroy_lock to get things working - LINUX_VERSION_CODE requires version.h --- diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c index bb3119b..8673d6a 100644 --- a/lustre/ldlm/ldlm_lock.c +++ b/lustre/ldlm/ldlm_lock.c @@ -211,7 +211,7 @@ void ldlm_lock_destroy(struct ldlm_lock *lock) lock->l_flags |= LDLM_FL_DESTROYED; /* Wake anyone waiting for this lock */ - if (lock->l_completion_ast) + if (lock->l_export && lock->l_completion_ast) lock->l_completion_ast(lock, 0); l_unlock(&lock->l_resource->lr_namespace->ns_lock); diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index cf820ea..af7f9a9 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -44,9 +44,8 @@ static int expired_completion_wait(void *data) CERROR("lock %p has NULL obd\n", lock); else if (!(conn = obd->u.cli.cl_import.imp_connection)) CERROR("lock %p has NULL connection\n", lock); - else { + else class_signal_connection_failure(conn); - } RETURN(0); } @@ -75,16 +74,17 @@ int ldlm_completion_ast(struct ldlm_lock *lock, int flags) int rc = 0; ENTRY; + if (flags == LDLM_FL_WAIT_NOREPROC) + goto noreproc; + if (flags == 0) { wake_up(&lock->l_waitq); RETURN(0); } - if (flags == LDLM_FL_WAIT_NOREPROC) - goto noreproc; - - LASSERT(flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED | - LDLM_FL_BLOCK_CONV)); + if (!(flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED | + LDLM_FL_BLOCK_CONV))) + RETURN(0); LDLM_DEBUG(lock, "client-side enqueue returned a blocked lock, " "sleeping"); diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 987f1dd..aa6dd50 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -32,10 +32,11 @@ #include #include #include +#include #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#include // for wait_on_buffer +# include // for wait_on_buffer #else -#include // for wait_on_buffer +# include // for wait_on_buffer #endif #define DEBUG_SUBSYSTEM S_LLITE