aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt Hackel <kurt.hackel@oracle.com>2006-04-27 22:04:49 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2006-06-26 17:42:55 -0400
commitaa85235427992b8d3040297d9174d69dd1d8a675 (patch)
treeb5ff7ae2f76b8d0fd66c6094f6c563c299ad50e7
parentdc2ed195dda848c8e4b24f3f0e1952fa74f74f6b (diff)
ocfs2: mle ref count debugging
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.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 1b28d3eedac7..9c5ef405bb39 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -371,9 +371,14 @@ static void __dlm_put_mle(struct dlm_master_list_entry *mle)
371 371
372 assert_spin_locked(&dlm->spinlock); 372 assert_spin_locked(&dlm->spinlock);
373 assert_spin_locked(&dlm->master_lock); 373 assert_spin_locked(&dlm->master_lock);
374 BUG_ON(!atomic_read(&mle->mle_refs.refcount)); 374 if (!atomic_read(&mle->mle_refs.refcount)) {
375 375 /* this may or may not crash, but who cares.
376 kref_put(&mle->mle_refs, dlm_mle_release); 376 * it's a BUG. */
377 mlog(ML_ERROR, "bad mle: %p\n", mle);
378 dlm_print_one_mle(mle);
379 BUG();
380 } else
381 kref_put(&mle->mle_refs, dlm_mle_release);
377} 382}
378 383
379 384
@@ -1008,6 +1013,12 @@ recheck:
1008 "rechecking now\n", dlm->name, res->lockname.len, 1013 "rechecking now\n", dlm->name, res->lockname.len,
1009 res->lockname.name); 1014 res->lockname.name);
1010 goto recheck; 1015 goto recheck;
1016 } else {
1017 if (!voting_done) {
1018 mlog(0, "map not changed and voting not done "
1019 "for %s:%.*s\n", dlm->name, res->lockname.len,
1020 res->lockname.name);
1021 }
1011 } 1022 }
1012 1023
1013 if (m != O2NM_MAX_NODES) { 1024 if (m != O2NM_MAX_NODES) {
@@ -1691,7 +1702,7 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data)
1691 if (bit >= O2NM_MAX_NODES) { 1702 if (bit >= O2NM_MAX_NODES) {
1692 /* not necessarily an error, though less likely. 1703 /* not necessarily an error, though less likely.
1693 * could be master just re-asserting. */ 1704 * could be master just re-asserting. */
1694 mlog(ML_ERROR, "no bits set in the maybe_map, but %u " 1705 mlog(0, "no bits set in the maybe_map, but %u "
1695 "is asserting! (%.*s)\n", assert->node_idx, 1706 "is asserting! (%.*s)\n", assert->node_idx,
1696 namelen, name); 1707 namelen, name);
1697 } else if (bit != assert->node_idx) { 1708 } else if (bit != assert->node_idx) {
@@ -1703,7 +1714,7 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data)
1703 * number winning the mastery will respond 1714 * number winning the mastery will respond
1704 * YES to mastery requests, but this node 1715 * YES to mastery requests, but this node
1705 * had no way of knowing. let it pass. */ 1716 * had no way of knowing. let it pass. */
1706 mlog(ML_ERROR, "%u is the lowest node, " 1717 mlog(0, "%u is the lowest node, "
1707 "%u is asserting. (%.*s) %u must " 1718 "%u is asserting. (%.*s) %u must "
1708 "have begun after %u won.\n", bit, 1719 "have begun after %u won.\n", bit,
1709 assert->node_idx, namelen, name, bit, 1720 assert->node_idx, namelen, name, bit,
@@ -2268,8 +2279,8 @@ fail:
2268 /* avoid hang during shutdown when migrating lockres 2279 /* avoid hang during shutdown when migrating lockres
2269 * to a node which also goes down */ 2280 * to a node which also goes down */
2270 if (dlm_is_node_dead(dlm, target)) { 2281 if (dlm_is_node_dead(dlm, target)) {
2271 mlog(0, "%s:%.*s: expected migration target %u " 2282 mlog(0, "%s:%.*s: expected migration "
2272 "is no longer up. restarting.\n", 2283 "target %u is no longer up, restarting\n",
2273 dlm->name, res->lockname.len, 2284 dlm->name, res->lockname.len,
2274 res->lockname.name, target); 2285 res->lockname.name, target);
2275 ret = -ERESTARTSYS; 2286 ret = -ERESTARTSYS;
@@ -2790,8 +2801,8 @@ top:
2790 spin_unlock(&mle->spinlock); 2801 spin_unlock(&mle->spinlock);
2791 wake_up(&mle->wq); 2802 wake_up(&mle->wq);
2792 2803
2793 mlog(0, "node %u died during migration from " 2804 mlog(0, "%s: node %u died during migration from "
2794 "%u to %u!\n", dead_node, 2805 "%u to %u!\n", dlm->name, dead_node,
2795 mle->master, mle->new_master); 2806 mle->master, mle->new_master);
2796 /* if there is a lockres associated with this 2807 /* if there is a lockres associated with this
2797 * mle, find it and set its owner to UNKNOWN */ 2808 * mle, find it and set its owner to UNKNOWN */