Skip to content

Commit 404ef3b

Browse files
biger410gregkh
authored andcommitted
ocfs2: o2hb: revert hb threshold to keep compatible
commit 33496c3c3d7b88dcbe5e55aa01288b05646c6aca upstream. Configfs is the interface for ocfs2-tools to set configure to kernel and $configfs_dir/cluster/$clustername/heartbeat/dead_threshold is the one used to configure heartbeat dead threshold. Kernel has a default value of it but user can set O2CB_HEARTBEAT_THRESHOLD in /etc/sysconfig/o2cb to override it. Commit 45b9977 ("ocfs2/cluster: use per-attribute show and store methods") changed heartbeat dead threshold name while ocfs2-tools did not, so ocfs2-tools won't set this configurable and the default value is always used. So revert it. Fixes: 45b9977 ("ocfs2/cluster: use per-attribute show and store methods") Link: http://lkml.kernel.org/r/1490665245-15374-1-git-send-email-junxiao.bi@oracle.com Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com> Acked-by: Joseph Qi <jiangqi903@gmail.com> Cc: Mark Fasheh <mfasheh@versity.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5d650fc commit 404ef3b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

fs/ocfs2/cluster/heartbeat.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,13 +2070,13 @@ static void o2hb_heartbeat_group_drop_item(struct config_group *group,
20702070
spin_unlock(&o2hb_live_lock);
20712071
}
20722072

2073-
static ssize_t o2hb_heartbeat_group_threshold_show(struct config_item *item,
2073+
static ssize_t o2hb_heartbeat_group_dead_threshold_show(struct config_item *item,
20742074
char *page)
20752075
{
20762076
return sprintf(page, "%u\n", o2hb_dead_threshold);
20772077
}
20782078

2079-
static ssize_t o2hb_heartbeat_group_threshold_store(struct config_item *item,
2079+
static ssize_t o2hb_heartbeat_group_dead_threshold_store(struct config_item *item,
20802080
const char *page, size_t count)
20812081
{
20822082
unsigned long tmp;
@@ -2125,11 +2125,11 @@ static ssize_t o2hb_heartbeat_group_mode_store(struct config_item *item,
21252125

21262126
}
21272127

2128-
CONFIGFS_ATTR(o2hb_heartbeat_group_, threshold);
2128+
CONFIGFS_ATTR(o2hb_heartbeat_group_, dead_threshold);
21292129
CONFIGFS_ATTR(o2hb_heartbeat_group_, mode);
21302130

21312131
static struct configfs_attribute *o2hb_heartbeat_group_attrs[] = {
2132-
&o2hb_heartbeat_group_attr_threshold,
2132+
&o2hb_heartbeat_group_attr_dead_threshold,
21332133
&o2hb_heartbeat_group_attr_mode,
21342134
NULL,
21352135
};

0 commit comments

Comments
 (0)