aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-01-28 17:11:41 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2008-03-03 18:50:21 -0500
commit006000566d4e95b8d1924addfb41094acf0d5ec2 (patch)
tree4f0617f1d7dcc1728e8d6e3bff17dbf510af4bb9 /fs
parent0dd3256e04c452396c9d22943e4a18e02f4dbdf4 (diff)
[2.6 patch] fs/ocfs2/: possible cleanups
This patch contains the following cleanups that are now possible: - make the following needlessly global functions static: - dlmglue.c:ocfs2_process_blocked_lock() - heartbeat.c:ocfs2_node_map_init() - #if 0 the following unused global function plus support functions: - heartbeat.c:ocfs2_node_map_is_only() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/dlmglue.c4
-rw-r--r--fs/ocfs2/dlmglue.h2
-rw-r--r--fs/ocfs2/heartbeat.c26
-rw-r--r--fs/ocfs2/heartbeat.h5
4 files changed, 15 insertions, 22 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index f4b3dab86997..d43efdc12751 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -3219,8 +3219,8 @@ static int ocfs2_dentry_convert_worker(struct ocfs2_lock_res *lockres,
3219 return UNBLOCK_CONTINUE_POST; 3219 return UNBLOCK_CONTINUE_POST;
3220} 3220}
3221 3221
3222void ocfs2_process_blocked_lock(struct ocfs2_super *osb, 3222static void ocfs2_process_blocked_lock(struct ocfs2_super *osb,
3223 struct ocfs2_lock_res *lockres) 3223 struct ocfs2_lock_res *lockres)
3224{ 3224{
3225 int status; 3225 int status;
3226 struct ocfs2_unblock_ctl ctl = {0, 0,}; 3226 struct ocfs2_unblock_ctl ctl = {0, 0,};
diff --git a/fs/ocfs2/dlmglue.h b/fs/ocfs2/dlmglue.h
index 1d5b0699d0a9..e3cf902404b4 100644
--- a/fs/ocfs2/dlmglue.h
+++ b/fs/ocfs2/dlmglue.h
@@ -109,8 +109,6 @@ void ocfs2_simple_drop_lockres(struct ocfs2_super *osb,
109 struct ocfs2_lock_res *lockres); 109 struct ocfs2_lock_res *lockres);
110 110
111/* for the downconvert thread */ 111/* for the downconvert thread */
112void ocfs2_process_blocked_lock(struct ocfs2_super *osb,
113 struct ocfs2_lock_res *lockres);
114void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb); 112void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb);
115 113
116struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void); 114struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void);
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,
49static inline void __ocfs2_node_map_clear_bit(struct ocfs2_node_map *map, 49static inline void __ocfs2_node_map_clear_bit(struct ocfs2_node_map *map,
50 int bit); 50 int bit);
51static inline int __ocfs2_node_map_is_empty(struct ocfs2_node_map *map); 51static inline int __ocfs2_node_map_is_empty(struct ocfs2_node_map *map);
52static void __ocfs2_node_map_dup(struct ocfs2_node_map *target, 52
53 struct ocfs2_node_map *from); 53/* special case -1 for now
54static 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); 55static 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
57void ocfs2_init_node_maps(struct ocfs2_super *osb) 62void 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!! */
141void 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
148static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map, 144static 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
219static void __ocfs2_node_map_dup(struct ocfs2_node_map *target, 217static 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 */
259int ocfs2_recovery_map_set(struct ocfs2_super *osb, 259int ocfs2_recovery_map_set(struct ocfs2_super *osb,
diff --git a/fs/ocfs2/heartbeat.h b/fs/ocfs2/heartbeat.h
index 56859211888a..eac63aed7611 100644
--- a/fs/ocfs2/heartbeat.h
+++ b/fs/ocfs2/heartbeat.h
@@ -33,7 +33,6 @@ void ocfs2_stop_heartbeat(struct ocfs2_super *osb);
33 33
34/* node map functions - used to keep track of mounted and in-recovery 34/* node map functions - used to keep track of mounted and in-recovery
35 * nodes. */ 35 * nodes. */
36void ocfs2_node_map_init(struct ocfs2_node_map *map);
37int ocfs2_node_map_is_empty(struct ocfs2_super *osb, 36int ocfs2_node_map_is_empty(struct ocfs2_super *osb,
38 struct ocfs2_node_map *map); 37 struct ocfs2_node_map *map);
39void ocfs2_node_map_set_bit(struct ocfs2_super *osb, 38void ocfs2_node_map_set_bit(struct ocfs2_super *osb,
@@ -57,9 +56,5 @@ int ocfs2_recovery_map_set(struct ocfs2_super *osb,
57 int num); 56 int num);
58void ocfs2_recovery_map_clear(struct ocfs2_super *osb, 57void ocfs2_recovery_map_clear(struct ocfs2_super *osb,
59 int num); 58 int num);
60/* returns 1 if bit is the only bit set in target, 0 otherwise */
61int ocfs2_node_map_is_only(struct ocfs2_super *osb,
62 struct ocfs2_node_map *target,
63 int bit);
64 59
65#endif /* OCFS2_HEARTBEAT_H */ 60#endif /* OCFS2_HEARTBEAT_H */