[Ocfs2-devel] [PATCH] A bug in the end of DLM recovery

Gechangwei ge.changwei at h3c.com
Fri Aug 5 22:58:57 PDT 2016


Hi,

I found an issue in the end of DLM recovery.
When DLM recovery comes to the end of recovery procedure, it will remaster all locks in other nodes.
Right after a request message is sent to a node A (say), the new master node will wait for node A’s response forever.
But node A may die just after receiving the remaster request, not responses to new master node yet.
That causes new master node waiting forever.
I think below patch can solve this problem. Please have a review!


Subject: [PATCH] interrupt waiting for node's response if node dies

Signed-off-by: gechangwei <ge.changwei at h3c.com>
---
dlm/dlmrecovery.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/dlm/dlmrecovery.c b/dlm/dlmrecovery.c
index 3d90ad7..5e455cb 100644
--- a/dlm/dlmrecovery.c
+++ b/dlm/dlmrecovery.c
@@ -679,6 +679,10 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node)
                                                 dlm->name, ndata->node_num,
                                                 ndata->state==DLM_RECO_NODE_DATA_RECEIVING ?
                                                 "receiving" : "requested");
+                                            if (dlm_is_node_dead(dlm, ndata->node_num)) {
+                                                      mlog(0, "%s: node %u died after requesting all locks.\n");
+                                                      ndata->state = DLM_RECO_NODE_DATA_DONE;
+                                            }
                                            all_nodes_done = 0;
                                            break;
                                   case DLM_RECO_NODE_DATA_DONE:
--

BR.

Chauncey


-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有杭州华三通信技术有限公司的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20160806/2fd57399/attachment.html 


More information about the Ocfs2-devel mailing list