[Ocfs2-devel] [PATCH] o2hb: increase unsteady iterations

Shichangkuo shi.changkuo at h3c.com
Tue Mar 29 05:32:21 PDT 2016


Hi Junxiao,
If tcp connections take a long time to establish, and hr_unsteady_iterations still may change to 0, then o2hb thread will exit by error.
What about wait the connection?

--- a/fs/ocfs2/cluster/heartbeat.c      2016-03-29 20:22:03.066400592 +0800
+++ a/fs/ocfs2/cluster/heartbeat.c      2016-03-29 20:20:55.494065519 +0800
@@ -1054,7 +1054,7 @@ bail:
        }

        if (atomic_read(&reg->hr_steady_iterations) != 0) {
-               if (atomic_dec_and_test(&reg->hr_unsteady_iterations)) {
+               if (!membership_change && atomic_dec_and_test(&reg->hr_unsteady_iterations)) {
                        printk(KERN_NOTICE "o2hb: Unable to stabilize "
                               "heartbeart on region %s (%s)\n",
                               config_item_name(&reg->hr_item),

Thanks
Changkuo

发件人: ocfs2-devel-bounces at oss.oracle.com [mailto:ocfs2-devel-bounces at oss.oracle.com] 代表 Junxiao Bi
发送时间: 2015年11月19日 16:08
收件人: ocfs2-devel at oss.oracle.com
抄送: mfasheh at suse.com
主题: [Ocfs2-devel] [PATCH] o2hb: increase unsteady iterations

When run multiple xattr test of ocfs2-test on a three-nodes cluster, mount failed sometimes with the following message.

o2hb: Unable to stabilize heartbeart on region D18B775E758D4D80837E8CF3D086AD4A (xvdb)

Stabilize heartbeat depends on the timing order to mount ocfs2 from cluster nodes and how fast the tcp connections are established. So increase unsteady interations to leave more time for it.

Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
---
 fs/ocfs2/cluster/heartbeat.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 709fbbd..a3cc6d2 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1780,8 +1780,8 @@ static ssize_t o2hb_region_dev_store(struct config_item *item,
        }
        ++live_threshold;
        atomic_set(&reg->hr_steady_iterations, live_threshold);
-       /* unsteady_iterations is double the steady_iterations */
-       atomic_set(&reg->hr_unsteady_iterations, (live_threshold << 1));
+       /* unsteady_iterations is triple the steady_iterations */
+       atomic_set(&reg->hr_unsteady_iterations, (live_threshold * 3));

        hb_task = kthread_run(o2hb_thread, reg, "o2hb-%s",
                              reg->hr_item.ci_name);
--
1.7.9.5


_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有杭州华三通信技术有限公司的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
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!


More information about the Ocfs2-devel mailing list