diff options
author | Sunil Mushran <sunil.mushran@oracle.com> | 2009-11-17 16:29:19 -0800 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-12-02 16:49:26 -0800 |
commit | f6656d26d17b2598f43cd41be088853fa2a03397 (patch) | |
tree | 5fdf95fdfab4302e28d9f00cf89ea4785ea9325c /fs/ocfs2/cluster/nodemanager.h | |
parent | 57b09bb5e492c37c1e4273fe4e435ffd1d2ddbe0 (diff) | |
download | talos-obmc-linux-f6656d26d17b2598f43cd41be088853fa2a03397.tar.gz talos-obmc-linux-f6656d26d17b2598f43cd41be088853fa2a03397.zip |
ocfs2/cluster: Make fence method configurable - v2
By default, o2cb fences the box by calling emergency_restart(). While this
scheme works well in production, it comes in the way during testing as it
does not let the tester take stack/core dumps for analysis.
This patch allows user to dynamically change the fence method to panic() by:
# echo "panic" > /sys/kernel/config/cluster/<clustername>/fence_method
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/cluster/nodemanager.h')
-rw-r--r-- | fs/ocfs2/cluster/nodemanager.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ocfs2/cluster/nodemanager.h b/fs/ocfs2/cluster/nodemanager.h index c992ea0da4ad..09ea2d388bbb 100644 --- a/fs/ocfs2/cluster/nodemanager.h +++ b/fs/ocfs2/cluster/nodemanager.h @@ -33,6 +33,12 @@ #include <linux/configfs.h> #include <linux/rbtree.h> +enum o2nm_fence_method { + O2NM_FENCE_RESET = 0, + O2NM_FENCE_PANIC, + O2NM_FENCE_METHODS, /* Number of fence methods */ +}; + struct o2nm_node { spinlock_t nd_lock; struct config_item nd_item; @@ -58,6 +64,7 @@ struct o2nm_cluster { unsigned int cl_idle_timeout_ms; unsigned int cl_keepalive_delay_ms; unsigned int cl_reconnect_delay_ms; + enum o2nm_fence_method cl_fence_method; /* this bitmap is part of a hack for disk bitmap.. will go eventually. - zab */ unsigned long cl_nodes_bitmap[BITS_TO_LONGS(O2NM_MAX_NODES)]; |