diff options
author | Kurt Hackel <kurt.hackel@oracle.com> | 2007-01-17 20:04:25 -0500 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-02-07 15:06:56 -0500 |
commit | d74c9803a90d733f5fb7270475aa6d14b45796c6 (patch) | |
tree | 7f402437667103773cfe7d76b56a621183e84094 /fs/ocfs2/cluster/tcp.h | |
parent | 74aa25856c693d20a886cdb31a004aaca411d135 (diff) |
ocfs2: Added post handler callable function in o2net message handler
Currently o2net allows one handler function per message type. This
patch adds the ability to call another function to be called after
the handler has returned the message to the other node.
Handlers are now given the option of returning a context (in the form of a
void **) which will be passed back into the post message handler function.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/cluster/tcp.h')
-rw-r--r-- | fs/ocfs2/cluster/tcp.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ocfs2/cluster/tcp.h b/fs/ocfs2/cluster/tcp.h index 21a4e43df836..da880fc215f0 100644 --- a/fs/ocfs2/cluster/tcp.h +++ b/fs/ocfs2/cluster/tcp.h | |||
@@ -50,7 +50,10 @@ struct o2net_msg | |||
50 | __u8 buf[0]; | 50 | __u8 buf[0]; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | typedef int (o2net_msg_handler_func)(struct o2net_msg *msg, u32 len, void *data); | 53 | typedef int (o2net_msg_handler_func)(struct o2net_msg *msg, u32 len, void *data, |
54 | void **ret_data); | ||
55 | typedef void (o2net_post_msg_handler_func)(int status, void *data, | ||
56 | void *ret_data); | ||
54 | 57 | ||
55 | #define O2NET_MAX_PAYLOAD_BYTES (4096 - sizeof(struct o2net_msg)) | 58 | #define O2NET_MAX_PAYLOAD_BYTES (4096 - sizeof(struct o2net_msg)) |
56 | 59 | ||
@@ -99,6 +102,7 @@ int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *vec, | |||
99 | 102 | ||
100 | int o2net_register_handler(u32 msg_type, u32 key, u32 max_len, | 103 | int o2net_register_handler(u32 msg_type, u32 key, u32 max_len, |
101 | o2net_msg_handler_func *func, void *data, | 104 | o2net_msg_handler_func *func, void *data, |
105 | o2net_post_msg_handler_func *post_func, | ||
102 | struct list_head *unreg_list); | 106 | struct list_head *unreg_list); |
103 | void o2net_unregister_handler_list(struct list_head *list); | 107 | void o2net_unregister_handler_list(struct list_head *list); |
104 | 108 | ||