Commit d5c5e8ba5d9d7b3378cf08274c86c8a340110b05

Authored by Junxiao Bi
Committed by Greg Kroah-Hartman
1 parent 8af88a950b

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 45b997737a80 ("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: 45b997737a80 ("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>

Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff

fs/ocfs2/cluster/heartbeat.c
... ... @@ -2242,13 +2242,13 @@
2242 2242 spin_unlock(&o2hb_live_lock);
2243 2243 }
2244 2244  
2245   -static ssize_t o2hb_heartbeat_group_threshold_show(struct config_item *item,
  2245 +static ssize_t o2hb_heartbeat_group_dead_threshold_show(struct config_item *item,
2246 2246 char *page)
2247 2247 {
2248 2248 return sprintf(page, "%u\n", o2hb_dead_threshold);
2249 2249 }
2250 2250  
2251   -static ssize_t o2hb_heartbeat_group_threshold_store(struct config_item *item,
  2251 +static ssize_t o2hb_heartbeat_group_dead_threshold_store(struct config_item *item,
2252 2252 const char *page, size_t count)
2253 2253 {
2254 2254 unsigned long tmp;
2255 2255  
... ... @@ -2297,11 +2297,11 @@
2297 2297  
2298 2298 }
2299 2299  
2300   -CONFIGFS_ATTR(o2hb_heartbeat_group_, threshold);
  2300 +CONFIGFS_ATTR(o2hb_heartbeat_group_, dead_threshold);
2301 2301 CONFIGFS_ATTR(o2hb_heartbeat_group_, mode);
2302 2302  
2303 2303 static struct configfs_attribute *o2hb_heartbeat_group_attrs[] = {
2304   - &o2hb_heartbeat_group_attr_threshold,
  2304 + &o2hb_heartbeat_group_attr_dead_threshold,
2305 2305 &o2hb_heartbeat_group_attr_mode,
2306 2306 NULL,
2307 2307 };