Commit 53ecd25e authored by Sunil Mushran's avatar Sunil Mushran Committed by Mark Fasheh

ocfs2/dlm: Make dlm_assert_master_handler() kill itself instead of the asserter

In dlm_assert_master_handler(), if we get an incorrect assert master from a node
that, we reply with EINVAL asking the asserter to die. The problem is that an
assert is sent after so many hoops, it is invariably the node that thinks the
asserter is wrong, is actually wrong. So instead of killing the asserter, this
patch kills the assertee.

This patch papers over a race that is still being addressed.
Signed-off-by: default avatarSunil Mushran <sunil.mushran@oracle.com>
Acked-by: default avatarJoel Becker <joel.becker@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent dabc47de
...@@ -1849,12 +1849,12 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data, ...@@ -1849,12 +1849,12 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data,
if (!mle) { if (!mle) {
if (res->owner != DLM_LOCK_RES_OWNER_UNKNOWN && if (res->owner != DLM_LOCK_RES_OWNER_UNKNOWN &&
res->owner != assert->node_idx) { res->owner != assert->node_idx) {
mlog(ML_ERROR, "assert_master from " mlog(ML_ERROR, "DIE! Mastery assert from %u, "
"%u, but current owner is " "but current owner is %u! (%.*s)\n",
"%u! (%.*s)\n", assert->node_idx, res->owner, namelen,
assert->node_idx, res->owner, name);
namelen, name); __dlm_print_one_lock_resource(res);
goto kill; BUG();
} }
} else if (mle->type != DLM_MLE_MIGRATION) { } else if (mle->type != DLM_MLE_MIGRATION) {
if (res->owner != DLM_LOCK_RES_OWNER_UNKNOWN) { if (res->owner != DLM_LOCK_RES_OWNER_UNKNOWN) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment