X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fldlm%2Fl_lock.c;h=11cd02d706acab05e87ccfcc74fa09ca25a7bbb1;hb=3fa8545b77fec1ffe89d7f7bbc5ce600020b282b;hp=2a4f83233485c496726c785d024426dd769a4352;hpb=250866233e4ae873f047277f990ce647cb5de246;p=fs%2Flustre-release.git diff --git a/lustre/ldlm/l_lock.c b/lustre/ldlm/l_lock.c index 2a4f832..11cd02d 100644 --- a/lustre/ldlm/l_lock.c +++ b/lustre/ldlm/l_lock.c @@ -85,9 +85,9 @@ void l_lock(struct lustre_lock *lock) void l_unlock(struct lustre_lock *lock) { - LASSERT(lock->l_owner == current); - LASSERT(lock->l_depth >= 0); - + LASSERTF(lock->l_owner == current, "lock %p, current %p\n", + lock->l_owner, current); + LASSERTF(lock->l_depth >= 0, "depth %d\n", lock->l_depth); spin_lock(&lock->l_spin); if (--lock->l_depth < 0) { lock->l_owner = NULL; @@ -121,11 +121,9 @@ void l_check_no_ns_lock(struct ldlm_namespace *ns) static unsigned long next_msg; if (l_has_lock(&ns->ns_lock) && time_after(jiffies, next_msg)) { - CERROR("namespace %s lock held during RPCs; tell phil\n", + CERROR("namespace %s lock held illegally; tell phil\n", ns->ns_name); -#if (LUSTRE_KERNEL_VERSION >= 30) - CERROR(portals_debug_dumpstack()); -#endif + portals_debug_dumpstack(NULL); next_msg = jiffies + 60 * HZ; } } @@ -133,6 +131,9 @@ void l_check_no_ns_lock(struct ldlm_namespace *ns) #else void l_check_no_ns_lock(struct ldlm_namespace *ns) { -#warning "FIXME: check lock in user space??" + if (l_has_lock(&ns->ns_lock)) { + CERROR("namespace %s lock held illegally; tell phil\n", + ns->ns_name); + } } #endif /* __KERNEL__ */