diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
commit | 65b53e4cc90e59936733b3b95b9451d2ca47528d (patch) | |
tree | 29932718192962671c48c3fd1ea017a6112459e8 /fs/ocfs2 | |
parent | 788c0a53164c05c5ccdb1472474372b72ba74644 (diff) | |
parent | 2e761e0532a784816e7e822dbaaece8c5d4be14d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/tg3.c
drivers/net/wireless/rt2x00/rt2x00dev.c
net/mac80211/ieee80211_i.h
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/alloc.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp.c | 28 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp.h | 12 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp_internal.h | 32 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmdebug.h | 12 | ||||
-rw-r--r-- | fs/ocfs2/stack_user.c | 34 |
6 files changed, 72 insertions, 50 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 41f84c92094f..10bfb466e068 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -2788,7 +2788,7 @@ static int ocfs2_merge_rec_right(struct inode *inode, | |||
2788 | BUG_ON(index >= le16_to_cpu(el->l_next_free_rec)); | 2788 | BUG_ON(index >= le16_to_cpu(el->l_next_free_rec)); |
2789 | left_rec = &el->l_recs[index]; | 2789 | left_rec = &el->l_recs[index]; |
2790 | 2790 | ||
2791 | if (index == le16_to_cpu(el->l_next_free_rec - 1) && | 2791 | if (index == le16_to_cpu(el->l_next_free_rec) - 1 && |
2792 | le16_to_cpu(el->l_next_free_rec) == le16_to_cpu(el->l_count)) { | 2792 | le16_to_cpu(el->l_next_free_rec) == le16_to_cpu(el->l_count)) { |
2793 | /* we meet with a cross extent block merge. */ | 2793 | /* we meet with a cross extent block merge. */ |
2794 | ret = ocfs2_get_right_path(inode, left_path, &right_path); | 2794 | ret = ocfs2_get_right_path(inode, left_path, &right_path); |
@@ -2802,7 +2802,7 @@ static int ocfs2_merge_rec_right(struct inode *inode, | |||
2802 | BUG_ON(next_free <= 0); | 2802 | BUG_ON(next_free <= 0); |
2803 | right_rec = &right_el->l_recs[0]; | 2803 | right_rec = &right_el->l_recs[0]; |
2804 | if (ocfs2_is_empty_extent(right_rec)) { | 2804 | if (ocfs2_is_empty_extent(right_rec)) { |
2805 | BUG_ON(le16_to_cpu(next_free) <= 1); | 2805 | BUG_ON(next_free <= 1); |
2806 | right_rec = &right_el->l_recs[1]; | 2806 | right_rec = &right_el->l_recs[1]; |
2807 | } | 2807 | } |
2808 | 2808 | ||
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 1e44ad14881a..a27d61581bd6 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -142,53 +142,43 @@ static void o2net_idle_timer(unsigned long data); | |||
142 | static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); | 142 | static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); |
143 | static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); | 143 | static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); |
144 | 144 | ||
145 | static void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
146 | u32 msgkey, struct task_struct *task, u8 node) | ||
147 | { | ||
148 | #ifdef CONFIG_DEBUG_FS | 145 | #ifdef CONFIG_DEBUG_FS |
146 | void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
147 | u32 msgkey, struct task_struct *task, u8 node) | ||
148 | { | ||
149 | INIT_LIST_HEAD(&nst->st_net_debug_item); | 149 | INIT_LIST_HEAD(&nst->st_net_debug_item); |
150 | nst->st_task = task; | 150 | nst->st_task = task; |
151 | nst->st_msg_type = msgtype; | 151 | nst->st_msg_type = msgtype; |
152 | nst->st_msg_key = msgkey; | 152 | nst->st_msg_key = msgkey; |
153 | nst->st_node = node; | 153 | nst->st_node = node; |
154 | #endif | ||
155 | } | 154 | } |
156 | 155 | ||
157 | static void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) | 156 | void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) |
158 | { | 157 | { |
159 | #ifdef CONFIG_DEBUG_FS | ||
160 | do_gettimeofday(&nst->st_sock_time); | 158 | do_gettimeofday(&nst->st_sock_time); |
161 | #endif | ||
162 | } | 159 | } |
163 | 160 | ||
164 | static void o2net_set_nst_send_time(struct o2net_send_tracking *nst) | 161 | void o2net_set_nst_send_time(struct o2net_send_tracking *nst) |
165 | { | 162 | { |
166 | #ifdef CONFIG_DEBUG_FS | ||
167 | do_gettimeofday(&nst->st_send_time); | 163 | do_gettimeofday(&nst->st_send_time); |
168 | #endif | ||
169 | } | 164 | } |
170 | 165 | ||
171 | static void o2net_set_nst_status_time(struct o2net_send_tracking *nst) | 166 | void o2net_set_nst_status_time(struct o2net_send_tracking *nst) |
172 | { | 167 | { |
173 | #ifdef CONFIG_DEBUG_FS | ||
174 | do_gettimeofday(&nst->st_status_time); | 168 | do_gettimeofday(&nst->st_status_time); |
175 | #endif | ||
176 | } | 169 | } |
177 | 170 | ||
178 | static void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, | 171 | void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, |
179 | struct o2net_sock_container *sc) | 172 | struct o2net_sock_container *sc) |
180 | { | 173 | { |
181 | #ifdef CONFIG_DEBUG_FS | ||
182 | nst->st_sc = sc; | 174 | nst->st_sc = sc; |
183 | #endif | ||
184 | } | 175 | } |
185 | 176 | ||
186 | static void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) | 177 | void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) |
187 | { | 178 | { |
188 | #ifdef CONFIG_DEBUG_FS | ||
189 | nst->st_id = msg_id; | 179 | nst->st_id = msg_id; |
190 | #endif | ||
191 | } | 180 | } |
181 | #endif /* CONFIG_DEBUG_FS */ | ||
192 | 182 | ||
193 | static inline int o2net_reconnect_delay(void) | 183 | static inline int o2net_reconnect_delay(void) |
194 | { | 184 | { |
diff --git a/fs/ocfs2/cluster/tcp.h b/fs/ocfs2/cluster/tcp.h index a705d5d19036..fd6179eb26d4 100644 --- a/fs/ocfs2/cluster/tcp.h +++ b/fs/ocfs2/cluster/tcp.h | |||
@@ -128,23 +128,23 @@ void o2net_debug_del_nst(struct o2net_send_tracking *nst); | |||
128 | void o2net_debug_add_sc(struct o2net_sock_container *sc); | 128 | void o2net_debug_add_sc(struct o2net_sock_container *sc); |
129 | void o2net_debug_del_sc(struct o2net_sock_container *sc); | 129 | void o2net_debug_del_sc(struct o2net_sock_container *sc); |
130 | #else | 130 | #else |
131 | static int o2net_debugfs_init(void) | 131 | static inline int o2net_debugfs_init(void) |
132 | { | 132 | { |
133 | return 0; | 133 | return 0; |
134 | } | 134 | } |
135 | static void o2net_debugfs_exit(void) | 135 | static inline void o2net_debugfs_exit(void) |
136 | { | 136 | { |
137 | } | 137 | } |
138 | static void o2net_debug_add_nst(struct o2net_send_tracking *nst) | 138 | static inline void o2net_debug_add_nst(struct o2net_send_tracking *nst) |
139 | { | 139 | { |
140 | } | 140 | } |
141 | static void o2net_debug_del_nst(struct o2net_send_tracking *nst) | 141 | static inline void o2net_debug_del_nst(struct o2net_send_tracking *nst) |
142 | { | 142 | { |
143 | } | 143 | } |
144 | static void o2net_debug_add_sc(struct o2net_sock_container *sc) | 144 | static inline void o2net_debug_add_sc(struct o2net_sock_container *sc) |
145 | { | 145 | { |
146 | } | 146 | } |
147 | static void o2net_debug_del_sc(struct o2net_sock_container *sc) | 147 | static inline void o2net_debug_del_sc(struct o2net_sock_container *sc) |
148 | { | 148 | { |
149 | } | 149 | } |
150 | #endif /* CONFIG_DEBUG_FS */ | 150 | #endif /* CONFIG_DEBUG_FS */ |
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h index 8d58cfe410b1..18307ff81b77 100644 --- a/fs/ocfs2/cluster/tcp_internal.h +++ b/fs/ocfs2/cluster/tcp_internal.h | |||
@@ -224,10 +224,42 @@ struct o2net_send_tracking { | |||
224 | struct timeval st_send_time; | 224 | struct timeval st_send_time; |
225 | struct timeval st_status_time; | 225 | struct timeval st_status_time; |
226 | }; | 226 | }; |
227 | |||
228 | void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
229 | u32 msgkey, struct task_struct *task, u8 node); | ||
230 | void o2net_set_nst_sock_time(struct o2net_send_tracking *nst); | ||
231 | void o2net_set_nst_send_time(struct o2net_send_tracking *nst); | ||
232 | void o2net_set_nst_status_time(struct o2net_send_tracking *nst); | ||
233 | void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, | ||
234 | struct o2net_sock_container *sc); | ||
235 | void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id); | ||
236 | |||
227 | #else | 237 | #else |
228 | struct o2net_send_tracking { | 238 | struct o2net_send_tracking { |
229 | u32 dummy; | 239 | u32 dummy; |
230 | }; | 240 | }; |
241 | |||
242 | static inline void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
243 | u32 msgkey, struct task_struct *task, u8 node) | ||
244 | { | ||
245 | } | ||
246 | static inline void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) | ||
247 | { | ||
248 | } | ||
249 | static inline void o2net_set_nst_send_time(struct o2net_send_tracking *nst) | ||
250 | { | ||
251 | } | ||
252 | static inline void o2net_set_nst_status_time(struct o2net_send_tracking *nst) | ||
253 | { | ||
254 | } | ||
255 | static inline void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, | ||
256 | struct o2net_sock_container *sc) | ||
257 | { | ||
258 | } | ||
259 | static inline void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, | ||
260 | u32 msg_id) | ||
261 | { | ||
262 | } | ||
231 | #endif /* CONFIG_DEBUG_FS */ | 263 | #endif /* CONFIG_DEBUG_FS */ |
232 | 264 | ||
233 | #endif /* O2CLUSTER_TCP_INTERNAL_H */ | 265 | #endif /* O2CLUSTER_TCP_INTERNAL_H */ |
diff --git a/fs/ocfs2/dlm/dlmdebug.h b/fs/ocfs2/dlm/dlmdebug.h index d34a62a3a625..8c686d22f9c7 100644 --- a/fs/ocfs2/dlm/dlmdebug.h +++ b/fs/ocfs2/dlm/dlmdebug.h | |||
@@ -60,25 +60,25 @@ void dlm_destroy_debugfs_root(void); | |||
60 | 60 | ||
61 | #else | 61 | #else |
62 | 62 | ||
63 | static int dlm_debug_init(struct dlm_ctxt *dlm) | 63 | static inline int dlm_debug_init(struct dlm_ctxt *dlm) |
64 | { | 64 | { |
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | static void dlm_debug_shutdown(struct dlm_ctxt *dlm) | 67 | static inline void dlm_debug_shutdown(struct dlm_ctxt *dlm) |
68 | { | 68 | { |
69 | } | 69 | } |
70 | static int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) | 70 | static inline int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) |
71 | { | 71 | { |
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | static void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) | 74 | static inline void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) |
75 | { | 75 | { |
76 | } | 76 | } |
77 | static int dlm_create_debugfs_root(void) | 77 | static inline int dlm_create_debugfs_root(void) |
78 | { | 78 | { |
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | static void dlm_destroy_debugfs_root(void) | 81 | static inline void dlm_destroy_debugfs_root(void) |
82 | { | 82 | { |
83 | } | 83 | } |
84 | 84 | ||
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index b503772cd0ec..6b97d11f6bf8 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c | |||
@@ -61,7 +61,7 @@ | |||
61 | * negotiated by the client. The client negotiates based on the maximum | 61 | * negotiated by the client. The client negotiates based on the maximum |
62 | * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major | 62 | * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major |
63 | * number from the "SETV" message must match | 63 | * number from the "SETV" message must match |
64 | * user_stack.sp_proto->lp_max_version.pv_major, and the minor number | 64 | * ocfs2_user_plugin.sp_proto->lp_max_version.pv_major, and the minor number |
65 | * must be less than or equal to ...->lp_max_version.pv_minor. | 65 | * must be less than or equal to ...->lp_max_version.pv_minor. |
66 | * | 66 | * |
67 | * Once this information has been set, mounts will be allowed. From this | 67 | * Once this information has been set, mounts will be allowed. From this |
@@ -153,7 +153,7 @@ union ocfs2_control_message { | |||
153 | struct ocfs2_control_message_down u_down; | 153 | struct ocfs2_control_message_down u_down; |
154 | }; | 154 | }; |
155 | 155 | ||
156 | static struct ocfs2_stack_plugin user_stack; | 156 | static struct ocfs2_stack_plugin ocfs2_user_plugin; |
157 | 157 | ||
158 | static atomic_t ocfs2_control_opened; | 158 | static atomic_t ocfs2_control_opened; |
159 | static int ocfs2_control_this_node = -1; | 159 | static int ocfs2_control_this_node = -1; |
@@ -399,7 +399,7 @@ static int ocfs2_control_do_setversion_msg(struct file *file, | |||
399 | char *ptr = NULL; | 399 | char *ptr = NULL; |
400 | struct ocfs2_control_private *p = file->private_data; | 400 | struct ocfs2_control_private *p = file->private_data; |
401 | struct ocfs2_protocol_version *max = | 401 | struct ocfs2_protocol_version *max = |
402 | &user_stack.sp_proto->lp_max_version; | 402 | &ocfs2_user_plugin.sp_proto->lp_max_version; |
403 | 403 | ||
404 | if (ocfs2_control_get_handshake_state(file) != | 404 | if (ocfs2_control_get_handshake_state(file) != |
405 | OCFS2_CONTROL_HANDSHAKE_PROTOCOL) | 405 | OCFS2_CONTROL_HANDSHAKE_PROTOCOL) |
@@ -680,7 +680,7 @@ static void fsdlm_lock_ast_wrapper(void *astarg) | |||
680 | struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg); | 680 | struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg); |
681 | int status = lksb->sb_status; | 681 | int status = lksb->sb_status; |
682 | 682 | ||
683 | BUG_ON(user_stack.sp_proto == NULL); | 683 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); |
684 | 684 | ||
685 | /* | 685 | /* |
686 | * For now we're punting on the issue of other non-standard errors | 686 | * For now we're punting on the issue of other non-standard errors |
@@ -693,16 +693,16 @@ static void fsdlm_lock_ast_wrapper(void *astarg) | |||
693 | */ | 693 | */ |
694 | 694 | ||
695 | if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL) | 695 | if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL) |
696 | user_stack.sp_proto->lp_unlock_ast(astarg, 0); | 696 | ocfs2_user_plugin.sp_proto->lp_unlock_ast(astarg, 0); |
697 | else | 697 | else |
698 | user_stack.sp_proto->lp_lock_ast(astarg); | 698 | ocfs2_user_plugin.sp_proto->lp_lock_ast(astarg); |
699 | } | 699 | } |
700 | 700 | ||
701 | static void fsdlm_blocking_ast_wrapper(void *astarg, int level) | 701 | static void fsdlm_blocking_ast_wrapper(void *astarg, int level) |
702 | { | 702 | { |
703 | BUG_ON(user_stack.sp_proto == NULL); | 703 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); |
704 | 704 | ||
705 | user_stack.sp_proto->lp_blocking_ast(astarg, level); | 705 | ocfs2_user_plugin.sp_proto->lp_blocking_ast(astarg, level); |
706 | } | 706 | } |
707 | 707 | ||
708 | static int user_dlm_lock(struct ocfs2_cluster_connection *conn, | 708 | static int user_dlm_lock(struct ocfs2_cluster_connection *conn, |
@@ -838,7 +838,7 @@ static int user_cluster_this_node(unsigned int *this_node) | |||
838 | return 0; | 838 | return 0; |
839 | } | 839 | } |
840 | 840 | ||
841 | static struct ocfs2_stack_operations user_stack_ops = { | 841 | static struct ocfs2_stack_operations ocfs2_user_plugin_ops = { |
842 | .connect = user_cluster_connect, | 842 | .connect = user_cluster_connect, |
843 | .disconnect = user_cluster_disconnect, | 843 | .disconnect = user_cluster_disconnect, |
844 | .this_node = user_cluster_this_node, | 844 | .this_node = user_cluster_this_node, |
@@ -849,20 +849,20 @@ static struct ocfs2_stack_operations user_stack_ops = { | |||
849 | .dump_lksb = user_dlm_dump_lksb, | 849 | .dump_lksb = user_dlm_dump_lksb, |
850 | }; | 850 | }; |
851 | 851 | ||
852 | static struct ocfs2_stack_plugin user_stack = { | 852 | static struct ocfs2_stack_plugin ocfs2_user_plugin = { |
853 | .sp_name = "user", | 853 | .sp_name = "user", |
854 | .sp_ops = &user_stack_ops, | 854 | .sp_ops = &ocfs2_user_plugin_ops, |
855 | .sp_owner = THIS_MODULE, | 855 | .sp_owner = THIS_MODULE, |
856 | }; | 856 | }; |
857 | 857 | ||
858 | 858 | ||
859 | static int __init user_stack_init(void) | 859 | static int __init ocfs2_user_plugin_init(void) |
860 | { | 860 | { |
861 | int rc; | 861 | int rc; |
862 | 862 | ||
863 | rc = ocfs2_control_init(); | 863 | rc = ocfs2_control_init(); |
864 | if (!rc) { | 864 | if (!rc) { |
865 | rc = ocfs2_stack_glue_register(&user_stack); | 865 | rc = ocfs2_stack_glue_register(&ocfs2_user_plugin); |
866 | if (rc) | 866 | if (rc) |
867 | ocfs2_control_exit(); | 867 | ocfs2_control_exit(); |
868 | } | 868 | } |
@@ -870,14 +870,14 @@ static int __init user_stack_init(void) | |||
870 | return rc; | 870 | return rc; |
871 | } | 871 | } |
872 | 872 | ||
873 | static void __exit user_stack_exit(void) | 873 | static void __exit ocfs2_user_plugin_exit(void) |
874 | { | 874 | { |
875 | ocfs2_stack_glue_unregister(&user_stack); | 875 | ocfs2_stack_glue_unregister(&ocfs2_user_plugin); |
876 | ocfs2_control_exit(); | 876 | ocfs2_control_exit(); |
877 | } | 877 | } |
878 | 878 | ||
879 | MODULE_AUTHOR("Oracle"); | 879 | MODULE_AUTHOR("Oracle"); |
880 | MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); | 880 | MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); |
881 | MODULE_LICENSE("GPL"); | 881 | MODULE_LICENSE("GPL"); |
882 | module_init(user_stack_init); | 882 | module_init(ocfs2_user_plugin_init); |
883 | module_exit(user_stack_exit); | 883 | module_exit(ocfs2_user_plugin_exit); |