aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/cluster/tcp_internal.h
diff options
context:
space:
mode:
authorSunil Mushran <sunil.mushran@oracle.com>2008-04-14 13:46:19 -0400
committerMark Fasheh <mfasheh@suse.com>2008-04-18 11:56:20 -0400
commit2309e9e040fe29469fb85a384636c455b62fe525 (patch)
treee3ecf7af432e1504a0c785525bc4247305916173 /fs/ocfs2/cluster/tcp_internal.h
parent93b06edb5127315473d87e075b2b1d1acf74659c (diff)
ocfs2/net: Add debug interface to o2net
This patch exposes o2net information via debugfs. The information includes the list of sockets (sock_containers) as well as the list of outstanding messages (send_tracking). Useful for o2dlm debugging. (This patch is derived from an earlier one written by Zach Brown that exposed the same information via /proc.) [Mark: checkpatch fixes] Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Reviewed-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/cluster/tcp_internal.h')
-rw-r--r--fs/ocfs2/cluster/tcp_internal.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h
index b4c5586f46ea..8d58cfe410b1 100644
--- a/fs/ocfs2/cluster/tcp_internal.h
+++ b/fs/ocfs2/cluster/tcp_internal.h
@@ -166,7 +166,9 @@ struct o2net_sock_container {
166 /* original handlers for the sockets */ 166 /* original handlers for the sockets */
167 void (*sc_state_change)(struct sock *sk); 167 void (*sc_state_change)(struct sock *sk);
168 void (*sc_data_ready)(struct sock *sk, int bytes); 168 void (*sc_data_ready)(struct sock *sk, int bytes);
169 169#ifdef CONFIG_DEBUG_FS
170 struct list_head sc_net_debug_item;
171#endif
170 struct timeval sc_tv_timer; 172 struct timeval sc_tv_timer;
171 struct timeval sc_tv_data_ready; 173 struct timeval sc_tv_data_ready;
172 struct timeval sc_tv_advance_start; 174 struct timeval sc_tv_advance_start;
@@ -208,4 +210,24 @@ struct o2net_status_wait {
208 struct list_head ns_node_item; 210 struct list_head ns_node_item;
209}; 211};
210 212
213#ifdef CONFIG_DEBUG_FS
214/* just for state dumps */
215struct o2net_send_tracking {
216 struct list_head st_net_debug_item;
217 struct task_struct *st_task;
218 struct o2net_sock_container *st_sc;
219 u32 st_id;
220 u32 st_msg_type;
221 u32 st_msg_key;
222 u8 st_node;
223 struct timeval st_sock_time;
224 struct timeval st_send_time;
225 struct timeval st_status_time;
226};
227#else
228struct o2net_send_tracking {
229 u32 dummy;
230};
231#endif /* CONFIG_DEBUG_FS */
232
211#endif /* O2CLUSTER_TCP_INTERNAL_H */ 233#endif /* O2CLUSTER_TCP_INTERNAL_H */