<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }p { margin-top: 0px; margin-bottom: 0px; }div.foxdiv20161109175530958805 { }body { font-size: 12pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style>
</head>
<body>
<div><span style="line-height: normal; background-color: rgb(255, 255, 255);"><font face="微软雅黑, Tahoma">Hi All,</font></span></div>
<div><span style="font-family: 微软雅黑, Tahoma; font-size: small; line-height: normal;"><br>
</span></div>
<div><span style="font-size: 12pt; background-color: window; font-family: 微软雅黑, Tahoma; line-height: normal;">when the mle have been used&nbsp;</span><span style="font-size: 12pt; background-color: window; font-family: 微软雅黑, Tahoma; line-height: normal;">in dlm_get_lock_resouce,
 other nodes dead at the same time,</span></div>
<div><font><span style="font-size: 16px; line-height: normal;">the mle that is block type may be&nbsp;</span><span style="line-height: 19px;">unlinked and freed<span style="background-color: rgb(255, 255, 255);">&nbsp;</span></span></font><span style="line-height: 20px; widows: 1; background-color: rgb(255, 255, 255);">repeatedly</span><span style="color: rgb(102, 102, 102); font-family: Arial, Helvetica; font-size: 13px; line-height: 20px; widows: 1; background-color: window;">&nbsp;</span><span style="line-height: 19px; background-color: window;">for
 dead nodes.</span></div>
<div><font size="2" style="font-size: 16px;"><span style="line-height: normal;">so it is a BUG &nbsp;about&nbsp;</span></font><span style="background-color: rgba(0, 0, 0, 0); font-size: 12pt; line-height: 1.5;">mle-&gt;mle_refs.refcount in</span><span style="background-color: window; line-height: normal;">&nbsp;</span><span style="line-height: 1.5; background-color: window;">__dlm_put_mle
 &nbsp;in&nbsp;</span><span style="background-color: window; line-height: normal;">dlm_get_lock_resouce.</span></div>
<div><span style="line-height: normal;"><font size="2" style="font-size: 16px;">Finally, any feedback about this process (positive or negative) would be&nbsp; greatly appreciated.</font></span></div>
<div><font size="2"><br>
</font></div>
<div><font size="2"><span></span>*** linux-4.1.35/fs/ocfs2/dlm/dlmmaster.c 2016-11-09 17:39:02.230163503 &#43;0800
<br>
--- dlmmaster.c.update 2016-11-09 17:41:39.210166752 &#43;0800 <br>
*************** <br>
*** 3229,3248 **** <br>
--- 3229,3261 ---- <br>
struct dlm_master_list_entry *mle, u8 dead_node) <br>
{ <br>
int bit; <br>
&#43; int next_bit = O2NM_MAX_NODES; <br>
BUG_ON(mle-&gt;type != DLM_MLE_BLOCK); <br>
<br>
spin_lock(&amp;mle-&gt;spinlock); <br>
bit = find_next_bit(mle-&gt;maybe_map, O2NM_MAX_NODES, 0); <br>
&#43; if (bit != O2NM_MAX_NODES) <br>
&#43; next_bit = find_next_bit(mle-&gt;maybe_map, O2NM_MAX_NODES, bit&#43;1); <br>
&#43; <br>
if (bit != dead_node) { <br>
mlog(0, &quot;mle found, but dead node %u would not have been &quot; <br>
&quot;master\n&quot;, dead_node); <br>
spin_unlock(&amp;mle-&gt;spinlock); <br>
&#43; } else if (mle-&gt;inuse &amp;&amp; next_bit != O2NM_MAX_NODES) { <br>
&#43; /*Ignore it, the mle is used, other nodes dead now. <br>
&#43; *as it is unlinked and freed for the dead node, it's a BUG*/ <br>
&#43; mlog(ML_ERROR, &quot;the mle is used, but inuse %d, dead node %u, &quot; <br>
&#43; &quot;master %u\n&quot;, mle-&gt;inuse, dead_node, mle-&gt;master); <br>
&#43; clear_bit(bit, mle-&gt;maybe_map); <br>
&#43; spin_unlock(&amp;mle-&gt;spinlock); <br>
&#43; <br>
} else { <br>
/* Must drop the refcount by one since the assert_master will <br>
* never arrive. This may result in the mle being unlinked and <br>
* freed, but there may still be a process waiting in the <br>
* dlmlock path which is fine. */ <br>
mlog(0, &quot;node %u was expected master\n&quot;, dead_node); <br>
&#43; clear_bit(bit, mle-&gt;maybe_map); <br>
atomic_set(&amp;mle-&gt;woken, 1); <br>
spin_unlock(&amp;mle-&gt;spinlock); <br>
wake_up(&amp;mle-&gt;wq);&nbsp;</font><br>
</div>
<div><br>
</div>
<hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span>
<div style="margin: 10px; font-size: 10pt;">
<div style="font-size: 16px;"><font face="verdana" color="#000080"><i>All the best wishes for you.</i></font></div>
<div style="font-size: 16px;"><i style="line-height: 1.5; font-family: verdana; background-color: window;"><font color="#000080">zhangguanghui</font></i></div>
</div>
</span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;">
<div>
<div class="FoxDiv20161109175530958805">
<p></p>
</div>
</div>
</blockquote>
<span style="font-size:7.5pt;font-family:华文细黑;color:gray"><span lang="EN-US">-------------------------------------------------------------------------------------------------------------------------------------<br>
</span>本邮件及其附件含有杭州华三通信技术有限公司的保密信息,仅限于发送给上面地址中列出<span lang="EN-US"><br>
</span>的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、<span lang="EN-US"><br>
</span>或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本<span lang="EN-US"><br>
</span>邮件!<span lang="EN-US"><br>
</span></span><span lang="EN-US" style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:gray">This e-mail and its attachments contain confidential information from H3C, which is
<br>
intended only for the person or entity whose address is listed above. Any use of the
<br>
information contained herein in any way (including, but not limited to, total or partial
<br>
disclosure, reproduction, or dissemination) by persons other than the intended <br>
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
<br>
by phone or email immediately and delete it!</span>
</body>
</html>