[Ocfs2-commits] khackel commits r2716 - trunk/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Dec 7 01:27:39 CST 2005
Author: khackel
Signed-off-by: mfasheh
Date: 2005-12-07 01:27:37 -0600 (Wed, 07 Dec 2005)
New Revision: 2716
Modified:
trunk/fs/ocfs2/dlm/dlmmaster.c
Log:
* fix bug 572
* restart lock mastery needs to properly deal with the death of the "expected master"
Signed-off-by: mfasheh
Modified: trunk/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmmaster.c 2005-12-07 07:19:42 UTC (rev 2715)
+++ trunk/fs/ocfs2/dlm/dlmmaster.c 2005-12-07 07:27:37 UTC (rev 2716)
@@ -761,6 +761,7 @@
/* make sure this does not get freed below */
alloc_mle = NULL;
dlm_init_mle(mle, DLM_MLE_MASTER, dlm, res, NULL, 0);
+ set_bit(dlm->node_num, mle->maybe_map);
list_add(&mle->list, &dlm->master_list);
}
@@ -873,8 +874,16 @@
/* restart if we hit any errors */
if (map_changed) {
+ int b;
mlog(0, "node map changed, restarting\n");
ret = dlm_restart_lock_mastery(dlm, res, mle, blocked);
+ b = (mle->type == DLM_MLE_BLOCK);
+ if ((blocked && !b) || (!blocked && b)) {
+ mlog(0, "%s:%.*s: status change: old=%d new=%d\n",
+ dlm->name, res->lockname.len, res->lockname.name,
+ blocked, b);
+ blocked = b;
+ }
spin_unlock(&mle->spinlock);
if (ret < 0) {
mlog_errno(ret);
@@ -1105,6 +1114,7 @@
memcpy(mle->vote_map, mle->node_map,
sizeof(mle->node_map));
mle->u.res = res;
+ set_bit(dlm->node_num, mle->maybe_map);
ret = -EAGAIN;
goto next;
More information about the Ocfs2-commits
mailing list