[PATCH 1/3] ocfs2/net: Silence build warnings
[deliverable/linux.git] / fs / ocfs2 / cluster / tcp.h
index 21a4e43df836159c177771974ffc215957d26bf3..fd6179eb26d4cd2cfb43f4ff053237837712113e 100644 (file)
@@ -50,15 +50,18 @@ struct o2net_msg
        __u8  buf[0];
 };
 
-typedef int (o2net_msg_handler_func)(struct o2net_msg *msg, u32 len, void *data);
+typedef int (o2net_msg_handler_func)(struct o2net_msg *msg, u32 len, void *data,
+                                    void **ret_data);
+typedef void (o2net_post_msg_handler_func)(int status, void *data,
+                                          void *ret_data);
 
 #define O2NET_MAX_PAYLOAD_BYTES  (4096 - sizeof(struct o2net_msg))
 
 /* same as hb delay, we're waiting for another node to recognize our hb */
 #define O2NET_RECONNECT_DELAY_MS_DEFAULT       2000
 
-#define O2NET_KEEPALIVE_DELAY_MS_DEFAULT       5000
-#define O2NET_IDLE_TIMEOUT_MS_DEFAULT          10000
+#define O2NET_KEEPALIVE_DELAY_MS_DEFAULT       2000
+#define O2NET_IDLE_TIMEOUT_MS_DEFAULT          30000
 
 
 /* TODO: figure this out.... */
@@ -99,6 +102,7 @@ int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *vec,
 
 int o2net_register_handler(u32 msg_type, u32 key, u32 max_len,
                           o2net_msg_handler_func *func, void *data,
+                          o2net_post_msg_handler_func *post_func,
                           struct list_head *unreg_list);
 void o2net_unregister_handler_list(struct list_head *list);
 
@@ -113,4 +117,36 @@ int o2net_num_connected_peers(void);
 int o2net_init(void);
 void o2net_exit(void);
 
+struct o2net_send_tracking;
+struct o2net_sock_container;
+
+#ifdef CONFIG_DEBUG_FS
+int o2net_debugfs_init(void);
+void o2net_debugfs_exit(void);
+void o2net_debug_add_nst(struct o2net_send_tracking *nst);
+void o2net_debug_del_nst(struct o2net_send_tracking *nst);
+void o2net_debug_add_sc(struct o2net_sock_container *sc);
+void o2net_debug_del_sc(struct o2net_sock_container *sc);
+#else
+static inline int o2net_debugfs_init(void)
+{
+       return 0;
+}
+static inline void o2net_debugfs_exit(void)
+{
+}
+static inline void o2net_debug_add_nst(struct o2net_send_tracking *nst)
+{
+}
+static inline void o2net_debug_del_nst(struct o2net_send_tracking *nst)
+{
+}
+static inline void o2net_debug_add_sc(struct o2net_sock_container *sc)
+{
+}
+static inline void o2net_debug_del_sc(struct o2net_sock_container *sc)
+{
+}
+#endif /* CONFIG_DEBUG_FS */
+
 #endif /* O2CLUSTER_TCP_H */
This page took 0.034098 seconds and 5 git commands to generate.