Commit 33496c3c authored by Junxiao Bi's avatar Junxiao Bi Committed by Linus Torvalds

ocfs2: o2hb: revert hb threshold to keep compatible

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 45b99773 ("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: 45b99773 ("ocfs2/cluster: use per-attribute show and store methods")
Link: http://lkml.kernel.org/r/1490665245-15374-1-git-send-email-junxiao.bi@oracle.comSigned-off-by: default avatarJunxiao Bi <junxiao.bi@oracle.com>
Acked-by: default avatarJoseph Qi <jiangqi903@gmail.com>
Cc: Mark Fasheh <mfasheh@versity.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 667b8a37
...@@ -2242,13 +2242,13 @@ static void o2hb_heartbeat_group_drop_item(struct config_group *group, ...@@ -2242,13 +2242,13 @@ static void o2hb_heartbeat_group_drop_item(struct config_group *group,
spin_unlock(&o2hb_live_lock); spin_unlock(&o2hb_live_lock);
} }
static ssize_t o2hb_heartbeat_group_threshold_show(struct config_item *item, static ssize_t o2hb_heartbeat_group_dead_threshold_show(struct config_item *item,
char *page) char *page)
{ {
return sprintf(page, "%u\n", o2hb_dead_threshold); return sprintf(page, "%u\n", o2hb_dead_threshold);
} }
static ssize_t o2hb_heartbeat_group_threshold_store(struct config_item *item, static ssize_t o2hb_heartbeat_group_dead_threshold_store(struct config_item *item,
const char *page, size_t count) const char *page, size_t count)
{ {
unsigned long tmp; unsigned long tmp;
...@@ -2297,11 +2297,11 @@ static ssize_t o2hb_heartbeat_group_mode_store(struct config_item *item, ...@@ -2297,11 +2297,11 @@ static ssize_t o2hb_heartbeat_group_mode_store(struct config_item *item,
} }
CONFIGFS_ATTR(o2hb_heartbeat_group_, threshold); CONFIGFS_ATTR(o2hb_heartbeat_group_, dead_threshold);
CONFIGFS_ATTR(o2hb_heartbeat_group_, mode); CONFIGFS_ATTR(o2hb_heartbeat_group_, mode);
static struct configfs_attribute *o2hb_heartbeat_group_attrs[] = { static struct configfs_attribute *o2hb_heartbeat_group_attrs[] = {
&o2hb_heartbeat_group_attr_threshold, &o2hb_heartbeat_group_attr_dead_threshold,
&o2hb_heartbeat_group_attr_mode, &o2hb_heartbeat_group_attr_mode,
NULL, NULL,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment