ocfs2: add userspace clustering
PATCH 13/14 ocfs2: add userspace clustering
This patch adds userspace clustering support as well as separate configurability of disk and userspace hearbeat modes.
fs/Kconfig | 22 +++ fs/ocfs2/cluster/Makefile | 5 fs/ocfs2/cluster/nodemanager.c | 5 fs/ocfs2/cluster/nodemanager.h | 5 fs/ocfs2/cluster/user_heartbeat.c | 213 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 244 insertions(+), 6 deletions(-)
fs/Kconfig | 22 +++ fs/ocfs2/cluster/Makefile | 5 fs/ocfs2/cluster/nodemanager.c | 5 fs/ocfs2/cluster/nodemanager.h | 5 fs/ocfs2/cluster/user_heartbeat.c | 214 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 245 insertions(+), 6 deletions(-)
Signed-off-by Jeff Mahoney <[email protected]>
fs/Kconfig +22 -0
@@ -356,6 +356,28 @@ config OCFS2_FS - POSIX ACLs - readpages / writepages (not user visible) +config OCFS2_FS_O2CB + tristate "O2CB Kernelspace Clustering" + depends on OCFS2_FS + default y + help + OCFS2 includes a simple kernelspace clustering package that requires + a very small userspace complement to configure it. However, it is + not as flexible as an external cluster manager, and is only + limited to maintaining a cluster for OCFS2 file systems. + If you are not using an external clustering package, choose + this option. + +config OCFS2_FS_USERSPACE_CLUSTER + tristate "Userspace Clustering" + depends on OCFS2_FS + default y + help + This option will allow OCFS2 to use userspace clustering services + via configfs and sysfs. Currently, the only supported userspace + clustering agent is the Linux-HA project from http://www.linux-ha.org. + If you are using a userspace cluster manager, choose this option. + config MINIX_FS tristate "Minix fs support" help
fs/ocfs2/cluster/Makefile +4 -1
@@ -1,7 +1,10 @@ -obj-$(CONFIG_OCFS2_FS) += ocfs2_nodemanager.o ocfs2_disk_heartbeat.o +obj-$(CONFIG_OCFS2_FS) += ocfs2_nodemanager.o +obj-$(CONFIG_OCFS2_FS_O2CB) += ocfs2_disk_heartbeat.o +obj-$(CONFIG_OCFS2_FS_USERSPACE_CLUSTER) += ocfs2_user_heartbeat.o ocfs2_nodemanager-objs := nodemanager.o heartbeat.o tcp.o net_proc.o \ masklog.o ver.o sys.o ocfs2_disk_heartbeat-objs := disk_heartbeat.o quorum.o +ocfs2_user_heartbeat-objs := user_heartbeat.o
fs/ocfs2/cluster/nodemanager.c +0 -5
@@ -218,11 +218,6 @@ static struct o2nm_cluster *to_o2nm_clus : NULL; } -static struct o2nm_node *to_o2nm_node (struct config_item *item) -{ - return item ? container_of(item, struct o2nm_node, nd_item) : NULL; -} -static void o2nm_node_release (struct config_item *item) {struct o2nm_node *node =to_o2nm_node (item);
fs/ocfs2/cluster/nodemanager.h +5 -0
@@ -74,4 +74,9 @@ struct o2nm_node *o2nm_get_node_by_ip(__void o2nm_node_get (struct o2nm_node *node);void o2nm_node_put (struct o2nm_node *node); +static inline struct o2nm_node *to_o2nm_node (struct config_item *item) +{ + return container_of(item, struct o2nm_node, nd_item); +} +#endif /* O2CLUSTER_NODEMANAGER_H */
fs/ocfs2/cluster/user_heartbeat.c +214 -0
214 lines not on this page · raw message