[Ocfs2-commits] zab commits r2371 - in trunk/fs/ocfs2: cluster dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Jun 6 19:22:17 CDT 2005
Author: zab
Signed-off-by: mfasheh
Date: 2005-06-06 19:22:16 -0500 (Mon, 06 Jun 2005)
New Revision: 2371
Modified:
trunk/fs/ocfs2/cluster/heartbeat.c
trunk/fs/ocfs2/dlm/dlmdomain.c
Log:
o add some missed cleanup in dlm_join_domain(), fixes panic on mount failure
o add some hb debugging that helped
Signed-off-by: mfasheh
Modified: trunk/fs/ocfs2/cluster/heartbeat.c
===================================================================
--- trunk/fs/ocfs2/cluster/heartbeat.c 2005-06-06 23:17:00 UTC (rev 2370)
+++ trunk/fs/ocfs2/cluster/heartbeat.c 2005-06-07 00:22:16 UTC (rev 2371)
@@ -418,6 +418,7 @@
list_for_each(iter, &hbcall->list) {
f = list_entry(iter, struct o2hb_callback_func, hc_item);
+ mlog(ML_HEARTBEAT, "calling funcs %p\n", f);
(f->hc_func)(node, idx, f->hc_data);
}
}
@@ -1349,13 +1350,16 @@
struct o2hb_callback_func *tmp;
struct list_head *iter;
struct o2hb_callback *hbcall;
+ int ret;
BUG_ON(hc->hc_magic != O2HB_CB_MAGIC);
BUG_ON(!list_empty(&hc->hc_item));
hbcall = hbcall_from_type(hc->hc_type);
- if (IS_ERR(hbcall))
- return PTR_ERR(hbcall);
+ if (IS_ERR(hbcall)) {
+ ret = PTR_ERR(hbcall);
+ goto out;
+ }
down_write(&o2hb_callback_sem);
@@ -1370,8 +1374,11 @@
list_add_tail(&hc->hc_item, &hbcall->list);
up_write(&o2hb_callback_sem);
-
- return 0;
+ ret = 0;
+out:
+ mlog(ML_HEARTBEAT, "returning %d on behalf of %p for funcs %p\n",
+ ret, __builtin_return_address(0), hc);
+ return ret;
}
EXPORT_SYMBOL_GPL(o2hb_register_callback);
@@ -1379,6 +1386,9 @@
{
BUG_ON(hc->hc_magic != O2HB_CB_MAGIC);
+ mlog(ML_HEARTBEAT, "on behalf of %p for funcs %p\n",
+ __builtin_return_address(0), hc);
+
if (list_empty(&hc->hc_item))
return 0;
Modified: trunk/fs/ocfs2/dlm/dlmdomain.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmdomain.c 2005-06-06 23:17:00 UTC (rev 2370)
+++ trunk/fs/ocfs2/dlm/dlmdomain.c 2005-06-07 00:22:16 UTC (rev 2371)
@@ -295,11 +295,7 @@
static void dlm_complete_dlm_shutdown(dlm_ctxt *dlm)
{
- o2hb_unregister_callback(&dlm->dlm_hb_up);
- o2hb_unregister_callback(&dlm->dlm_hb_down);
-
dlm_unregister_domain_handlers(dlm);
-
dlm_complete_thread(dlm);
dlm_complete_recovery_thread(dlm);
@@ -953,6 +949,8 @@
static void dlm_unregister_domain_handlers(dlm_ctxt *dlm)
{
+ o2hb_unregister_callback(&dlm->dlm_hb_up);
+ o2hb_unregister_callback(&dlm->dlm_hb_down);
o2net_unregister_handler_list(&dlm->dlm_domain_handlers);
}
@@ -1135,6 +1133,11 @@
bail:
wake_up(&dlm_domain_events);
+ if (status) {
+ dlm_unregister_domain_handlers(dlm);
+ dlm_complete_thread(dlm);
+ }
+
return status;
}
More information about the Ocfs2-commits
mailing list