[patch 1/3] OCFS2 - Expose struct o2nm_cluster

Subsequent patches (namely userspace heartbeat and configurable timeouts)
require access to the o2nm_cluster struct. This patch does the necessary
shuffling.

Signed-off-by: Andrew Beekhof <abeekhof@suse.de>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>

authored by Andrew Beekhof and committed by Mark Fasheh 296b75ed 8903901d

+15 -12
+1 -12
fs/ocfs2/cluster/nodemanager.c
··· 35 35 /* for now we operate under the assertion that there can be only one 36 36 * cluster active at a time. Changing this will require trickling 37 37 * cluster references throughout where nodes are looked up */ 38 - static struct o2nm_cluster *o2nm_single_cluster = NULL; 38 + struct o2nm_cluster *o2nm_single_cluster = NULL; 39 39 40 40 #define OCFS2_MAX_HB_CTL_PATH 256 41 41 static char ocfs2_hb_ctl_path[OCFS2_MAX_HB_CTL_PATH] = "/sbin/ocfs2_hb_ctl"; ··· 96 96 return ocfs2_hb_ctl_path; 97 97 } 98 98 EXPORT_SYMBOL_GPL(o2nm_get_hb_ctl_path); 99 - 100 - struct o2nm_cluster { 101 - struct config_group cl_group; 102 - unsigned cl_has_local:1; 103 - u8 cl_local_node; 104 - rwlock_t cl_nodes_lock; 105 - struct o2nm_node *cl_nodes[O2NM_MAX_NODES]; 106 - struct rb_root cl_node_ip_tree; 107 - /* this bitmap is part of a hack for disk bitmap.. will go eventually. - zab */ 108 - unsigned long cl_nodes_bitmap[BITS_TO_LONGS(O2NM_MAX_NODES)]; 109 - }; 110 99 111 100 struct o2nm_node *o2nm_get_node_by_num(u8 node_num) 112 101 {
+14
fs/ocfs2/cluster/nodemanager.h
··· 53 53 unsigned long nd_set_attributes; 54 54 }; 55 55 56 + struct o2nm_cluster { 57 + struct config_group cl_group; 58 + unsigned cl_has_local:1; 59 + u8 cl_local_node; 60 + rwlock_t cl_nodes_lock; 61 + struct o2nm_node *cl_nodes[O2NM_MAX_NODES]; 62 + struct rb_root cl_node_ip_tree; 63 + 64 + /* this bitmap is part of a hack for disk bitmap.. will go eventually. - zab */ 65 + unsigned long cl_nodes_bitmap[BITS_TO_LONGS(O2NM_MAX_NODES)]; 66 + }; 67 + 68 + extern struct o2nm_cluster *o2nm_single_cluster; 69 + 56 70 u8 o2nm_this_node(void); 57 71 58 72 int o2nm_configured_node_map(unsigned long *map, unsigned bytes);