diff options
Diffstat (limited to 'fs/ocfs2/heartbeat.c')
-rw-r--r-- | fs/ocfs2/heartbeat.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/ocfs2/heartbeat.c b/fs/ocfs2/heartbeat.c index c0efd9489fe8..0758daf64da0 100644 --- a/fs/ocfs2/heartbeat.c +++ b/fs/ocfs2/heartbeat.c | |||
@@ -49,10 +49,15 @@ static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map, | |||
49 | static inline void __ocfs2_node_map_clear_bit(struct ocfs2_node_map *map, | 49 | static inline void __ocfs2_node_map_clear_bit(struct ocfs2_node_map *map, |
50 | int bit); | 50 | int bit); |
51 | static inline int __ocfs2_node_map_is_empty(struct ocfs2_node_map *map); | 51 | static inline int __ocfs2_node_map_is_empty(struct ocfs2_node_map *map); |
52 | static void __ocfs2_node_map_dup(struct ocfs2_node_map *target, | 52 | |
53 | struct ocfs2_node_map *from); | 53 | /* special case -1 for now |
54 | static void __ocfs2_node_map_set(struct ocfs2_node_map *target, | 54 | * TODO: should *really* make sure the calling func never passes -1!! */ |
55 | struct ocfs2_node_map *from); | 55 | static void ocfs2_node_map_init(struct ocfs2_node_map *map) |
56 | { | ||
57 | map->num_nodes = OCFS2_NODE_MAP_MAX_NODES; | ||
58 | memset(map->map, 0, BITS_TO_LONGS(OCFS2_NODE_MAP_MAX_NODES) * | ||
59 | sizeof(unsigned long)); | ||
60 | } | ||
56 | 61 | ||
57 | void ocfs2_init_node_maps(struct ocfs2_super *osb) | 62 | void ocfs2_init_node_maps(struct ocfs2_super *osb) |
58 | { | 63 | { |
@@ -136,15 +141,6 @@ void ocfs2_stop_heartbeat(struct ocfs2_super *osb) | |||
136 | mlog_errno(ret); | 141 | mlog_errno(ret); |
137 | } | 142 | } |
138 | 143 | ||
139 | /* special case -1 for now | ||
140 | * TODO: should *really* make sure the calling func never passes -1!! */ | ||
141 | void ocfs2_node_map_init(struct ocfs2_node_map *map) | ||
142 | { | ||
143 | map->num_nodes = OCFS2_NODE_MAP_MAX_NODES; | ||
144 | memset(map->map, 0, BITS_TO_LONGS(OCFS2_NODE_MAP_MAX_NODES) * | ||
145 | sizeof(unsigned long)); | ||
146 | } | ||
147 | |||
148 | static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map, | 144 | static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map, |
149 | int bit) | 145 | int bit) |
150 | { | 146 | { |
@@ -216,6 +212,8 @@ int ocfs2_node_map_is_empty(struct ocfs2_super *osb, | |||
216 | return ret; | 212 | return ret; |
217 | } | 213 | } |
218 | 214 | ||
215 | #if 0 | ||
216 | |||
219 | static void __ocfs2_node_map_dup(struct ocfs2_node_map *target, | 217 | static void __ocfs2_node_map_dup(struct ocfs2_node_map *target, |
220 | struct ocfs2_node_map *from) | 218 | struct ocfs2_node_map *from) |
221 | { | 219 | { |
@@ -254,6 +252,8 @@ static void __ocfs2_node_map_set(struct ocfs2_node_map *target, | |||
254 | target->map[i] = from->map[i]; | 252 | target->map[i] = from->map[i]; |
255 | } | 253 | } |
256 | 254 | ||
255 | #endif /* 0 */ | ||
256 | |||
257 | /* Returns whether the recovery bit was actually set - it may not be | 257 | /* Returns whether the recovery bit was actually set - it may not be |
258 | * if a node is still marked as needing recovery */ | 258 | * if a node is still marked as needing recovery */ |
259 | int ocfs2_recovery_map_set(struct ocfs2_super *osb, | 259 | int ocfs2_recovery_map_set(struct ocfs2_super *osb, |