diff options
author | Kurt Hackel <kurt.hackel@oracle.com> | 2006-04-27 22:24:21 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-06-26 17:42:56 -0400 |
commit | a7f90d83ea8dc8b0999ab7c1c0539af9a6ed69d2 (patch) | |
tree | cd9ec7e46c8ab6a863c1d152a755a78be8e31b73 | |
parent | c0a8520c7333dd62624683772f31864c7f9c46d9 (diff) |
ocfs2: dump lockres info before we BUG() on a bad reference
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 9c5ef405bb39..427c0af0d219 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -619,6 +619,28 @@ static void dlm_lockres_release(struct kref *kref) | |||
619 | mlog(0, "destroying lockres %.*s\n", res->lockname.len, | 619 | mlog(0, "destroying lockres %.*s\n", res->lockname.len, |
620 | res->lockname.name); | 620 | res->lockname.name); |
621 | 621 | ||
622 | if (!hlist_unhashed(&res->hash_node) || | ||
623 | !list_empty(&res->granted) || | ||
624 | !list_empty(&res->converting) || | ||
625 | !list_empty(&res->blocked) || | ||
626 | !list_empty(&res->dirty) || | ||
627 | !list_empty(&res->recovering) || | ||
628 | !list_empty(&res->purge)) { | ||
629 | mlog(ML_ERROR, | ||
630 | "Going to BUG for resource %.*s." | ||
631 | " We're on a list! [%c%c%c%c%c%c%c]\n", | ||
632 | res->lockname.len, res->lockname.name, | ||
633 | !hlist_unhashed(&res->hash_node) ? 'H' : ' ', | ||
634 | !list_empty(&res->granted) ? 'G' : ' ', | ||
635 | !list_empty(&res->converting) ? 'C' : ' ', | ||
636 | !list_empty(&res->blocked) ? 'B' : ' ', | ||
637 | !list_empty(&res->dirty) ? 'D' : ' ', | ||
638 | !list_empty(&res->recovering) ? 'R' : ' ', | ||
639 | !list_empty(&res->purge) ? 'P' : ' '); | ||
640 | |||
641 | dlm_print_one_lock_resource(res); | ||
642 | } | ||
643 | |||
622 | /* By the time we're ready to blow this guy away, we shouldn't | 644 | /* By the time we're ready to blow this guy away, we shouldn't |
623 | * be on any lists. */ | 645 | * be on any lists. */ |
624 | BUG_ON(!hlist_unhashed(&res->hash_node)); | 646 | BUG_ON(!hlist_unhashed(&res->hash_node)); |