]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Sunil Mushran <sunil.mushran@oracle.com> |
2 | Date: Tue, 3 Feb 2009 12:37:16 -0800 | |
3 | Subject: [PATCH] ocfs2/dlm: Make dlm_assert_master_handler() kill itself instead of the asserter | |
4 | Patch-mainline: 2.6.29 | |
5 | ||
6 | In dlm_assert_master_handler(), if we get an incorrect assert master from a node | |
7 | that, we reply with EINVAL asking the asserter to die. The problem is that an | |
8 | assert is sent after so many hoops, it is invariably the node that thinks the | |
9 | asserter is wrong, is actually wrong. So instead of killing the asserter, this | |
10 | patch kills the assertee. | |
11 | ||
12 | This patch papers over a race that is still being addressed. | |
13 | ||
14 | Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> | |
15 | Acked-by: Joel Becker <joel.becker@oracle.com> | |
16 | Signed-off-by: Mark Fasheh <mfasheh@suse.com> | |
17 | --- | |
18 | fs/ocfs2/dlm/dlmmaster.c | 12 ++++++------ | |
19 | 1 files changed, 6 insertions(+), 6 deletions(-) | |
20 | ||
21 | Index: linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/dlm/dlmmaster.c | |
22 | =================================================================== | |
23 | --- linux-2.6.27-sle11_ocfs2_update2.orig/fs/ocfs2/dlm/dlmmaster.c | |
24 | +++ linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/dlm/dlmmaster.c | |
25 | @@ -1832,12 +1832,12 @@ int dlm_assert_master_handler(struct o2n | |
26 | if (!mle) { | |
27 | if (res->owner != DLM_LOCK_RES_OWNER_UNKNOWN && | |
28 | res->owner != assert->node_idx) { | |
29 | - mlog(ML_ERROR, "assert_master from " | |
30 | - "%u, but current owner is " | |
31 | - "%u! (%.*s)\n", | |
32 | - assert->node_idx, res->owner, | |
33 | - namelen, name); | |
34 | - goto kill; | |
35 | + mlog(ML_ERROR, "DIE! Mastery assert from %u, " | |
36 | + "but current owner is %u! (%.*s)\n", | |
37 | + assert->node_idx, res->owner, namelen, | |
38 | + name); | |
39 | + __dlm_print_one_lock_resource(res); | |
40 | + BUG(); | |
41 | } | |
42 | } else if (mle->type != DLM_MLE_MIGRATION) { | |
43 | if (res->owner != DLM_LOCK_RES_OWNER_UNKNOWN) { |