<div dir="ltr">Resending as my reply bounced.<br><br><div><div class="gmail_extra"><div class="gmail_quote">On Thu, May 9, 2013 at 10:01 AM, Sunil Mushran <span dir="ltr"><<a href="mailto:sunil.mushran@gmail.com" target="_blank">sunil.mushran@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>A better fix is to _not_ disconnect on o2net timeout once a connection has been<br>cleanly established. Only disconnect on o2hb timeout.<br>
<br></div><div>The reconnects are a problem as we could lose packets and not be aware of it<br>
leading to o2dlm hangs.<br><br></div><div>IOW, this patch looks to be papering over one specific problem and does not fix the<br>underlying issue.<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
<div><div>
On Tue, May 7, 2013 at 7:43 PM, Guozhonghua <span dir="ltr"><<a href="mailto:guozhonghua@h3c.com" target="_blank">guozhonghua@h3c.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>
<div link="blue" vlink="purple" lang="ZH-CN">
<div>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Hi, everyone,</span></p>
<p class="MsoNormal"><span lang="EN-US">I had have a test with eight nodes and find one issue.</span></p>
<p class="MsoNormal"><span lang="EN-US"><br>
The Linux kernel version is 3.2.40.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">As I migrate processes from one node to another, those processes is open the files on the OCFS2 storage. Sometime one node shutdown TCP connection with that node whose node number is larger because long time without any
message from it. </span></p>
<p class="MsoNormal"><span lang="EN-US">As the TCP connection shutdown, the node whose number larger did not restart connection to the node, whose number is little and shutdown the TCP connection.</span></p>
<p class="MsoNormal"><span lang="EN-US">So I review the code of the cluster and find it may be a bug.
</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">I changed it and have a test. </span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Is there anybody having time to view and make sure that those changes is correct?</span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks a lot.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">The diff file is as below, of the file is /cluster/tcp.c:
</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">root@gzh-dev:/home/dev/test_replace/ocfs2_ko# diff -pu ocfs2-ko-3.2-compare/cluster/tcp.c ocfs2-ko-3.2/cluster/tcp.c
</span></p>
<p class="MsoNormal"><span lang="EN-US">--- ocfs2-ko-3.2-compare/cluster/tcp.c 2012-10-29 19:33:19.534200000 +0800</span></p>
<p class="MsoNormal"><span lang="EN-US">+++ ocfs2-ko-3.2/cluster/tcp.c 2013-05-08 09:33:16.386277310 +0800</span></p>
<p class="MsoNormal"><span lang="EN-US">@@ -1699,6 +1698,10 @@ static void o2net_start_connect(struct w</span></p>
<p class="MsoNormal"><span lang="EN-US"> if (ret == -EINPROGRESS)</span></p>
<p class="MsoNormal"><span lang="EN-US"> ret = 0;</span></p>
<p class="MsoNormal"><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US">+ /** Reset the timeout with 0 to avoid connection again */</span></p>
<p class="MsoNormal"><span lang="EN-US">+ if (ret == 0) { </span></p>
<p class="MsoNormal"><span lang="EN-US">+ atomic_set(&nn->nn_timeout, 0);
</span></p>
<p class="MsoNormal"><span lang="EN-US">+ }</span></p>
<p class="MsoNormal"><span lang="EN-US">out:</span></p>
<p class="MsoNormal"><span lang="EN-US"> if (ret) {</span></p>
<p class="MsoNormal"><span lang="EN-US"> printk(KERN_NOTICE "o2net: Connect attempt to " SC_NODEF_FMT</span></p>
<p class="MsoNormal"><span lang="EN-US">@@ -1725,6 +1728,11 @@ static void o2net_connect_expired(struct</span></p>
<p class="MsoNormal"><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US"> spin_lock(&nn->nn_lock);</span></p>
<p class="MsoNormal"><span lang="EN-US"> if (!nn->nn_sc_valid) {</span></p>
<p class="MsoNormal"><span lang="EN-US">+ /** trigger reconnect with other nodes whose node number is little than local</span></p>
<p class="MsoNormal"><span lang="EN-US">+ * while they are still able to access the storage</span></p>
<p class="MsoNormal"><span lang="EN-US">+ */</span></p>
<p class="MsoNormal"><span lang="EN-US">+ atomic_set(&nn->nn_timeout, 1);</span></p>
<p class="MsoNormal"><span lang="EN-US">+ </span></p>
<p class="MsoNormal"><span lang="EN-US"> printk(KERN_NOTICE "o2net: No connection established with "</span></p>
<p class="MsoNormal"><span lang="EN-US"> "node %u after %u.%u seconds, giving up.\n",</span></p>
<p class="MsoNormal"><span lang="EN-US"> o2net_num_from_nn(nn),</span></p>
</div><span style="font-size:7.5pt;font-family:华文细黑;color:gray"><span lang="EN-US"></span></span><br></div></div></div></blockquote></div></div></blockquote></div></div></div></div>