diff options
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/cluster/tcp.c | 12 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp.h | 6 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp_internal.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmast.c | 3 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmcommon.h | 42 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmconvert.c | 3 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmdomain.c | 60 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmlock.c | 3 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 12 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmrecovery.c | 18 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmunlock.c | 3 | ||||
-rw-r--r-- | fs/ocfs2/vote.c | 8 |
12 files changed, 112 insertions, 60 deletions
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index ae4ff4a6636b..7700418d25ec 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -688,6 +688,7 @@ static void o2net_handler_put(struct o2net_msg_handler *nmh) | |||
688 | * be given to the handler if their payload is longer than the max. */ | 688 | * be given to the handler if their payload is longer than the max. */ |
689 | int o2net_register_handler(u32 msg_type, u32 key, u32 max_len, | 689 | int o2net_register_handler(u32 msg_type, u32 key, u32 max_len, |
690 | o2net_msg_handler_func *func, void *data, | 690 | o2net_msg_handler_func *func, void *data, |
691 | o2net_post_msg_handler_func *post_func, | ||
691 | struct list_head *unreg_list) | 692 | struct list_head *unreg_list) |
692 | { | 693 | { |
693 | struct o2net_msg_handler *nmh = NULL; | 694 | struct o2net_msg_handler *nmh = NULL; |
@@ -722,6 +723,7 @@ int o2net_register_handler(u32 msg_type, u32 key, u32 max_len, | |||
722 | 723 | ||
723 | nmh->nh_func = func; | 724 | nmh->nh_func = func; |
724 | nmh->nh_func_data = data; | 725 | nmh->nh_func_data = data; |
726 | nmh->nh_post_func = post_func; | ||
725 | nmh->nh_msg_type = msg_type; | 727 | nmh->nh_msg_type = msg_type; |
726 | nmh->nh_max_len = max_len; | 728 | nmh->nh_max_len = max_len; |
727 | nmh->nh_key = key; | 729 | nmh->nh_key = key; |
@@ -1049,6 +1051,7 @@ static int o2net_process_message(struct o2net_sock_container *sc, | |||
1049 | int ret = 0, handler_status; | 1051 | int ret = 0, handler_status; |
1050 | enum o2net_system_error syserr; | 1052 | enum o2net_system_error syserr; |
1051 | struct o2net_msg_handler *nmh = NULL; | 1053 | struct o2net_msg_handler *nmh = NULL; |
1054 | void *ret_data = NULL; | ||
1052 | 1055 | ||
1053 | msglog(hdr, "processing message\n"); | 1056 | msglog(hdr, "processing message\n"); |
1054 | 1057 | ||
@@ -1101,7 +1104,7 @@ static int o2net_process_message(struct o2net_sock_container *sc, | |||
1101 | sc->sc_msg_type = be16_to_cpu(hdr->msg_type); | 1104 | sc->sc_msg_type = be16_to_cpu(hdr->msg_type); |
1102 | handler_status = (nmh->nh_func)(hdr, sizeof(struct o2net_msg) + | 1105 | handler_status = (nmh->nh_func)(hdr, sizeof(struct o2net_msg) + |
1103 | be16_to_cpu(hdr->data_len), | 1106 | be16_to_cpu(hdr->data_len), |
1104 | nmh->nh_func_data); | 1107 | nmh->nh_func_data, &ret_data); |
1105 | do_gettimeofday(&sc->sc_tv_func_stop); | 1108 | do_gettimeofday(&sc->sc_tv_func_stop); |
1106 | 1109 | ||
1107 | out_respond: | 1110 | out_respond: |
@@ -1112,6 +1115,13 @@ out_respond: | |||
1112 | mlog(0, "sending handler status %d, syserr %d returned %d\n", | 1115 | mlog(0, "sending handler status %d, syserr %d returned %d\n", |
1113 | handler_status, syserr, ret); | 1116 | handler_status, syserr, ret); |
1114 | 1117 | ||
1118 | if (nmh) { | ||
1119 | BUG_ON(ret_data != NULL && nmh->nh_post_func == NULL); | ||
1120 | if (nmh->nh_post_func) | ||
1121 | (nmh->nh_post_func)(handler_status, nmh->nh_func_data, | ||
1122 | ret_data); | ||
1123 | } | ||
1124 | |||
1115 | out: | 1125 | out: |
1116 | if (nmh) | 1126 | if (nmh) |
1117 | o2net_handler_put(nmh); | 1127 | o2net_handler_put(nmh); |
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 | ||
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h index 775c911342f4..d74040fac343 100644 --- a/fs/ocfs2/cluster/tcp_internal.h +++ b/fs/ocfs2/cluster/tcp_internal.h | |||
@@ -161,6 +161,8 @@ struct o2net_msg_handler { | |||
161 | u32 nh_key; | 161 | u32 nh_key; |
162 | o2net_msg_handler_func *nh_func; | 162 | o2net_msg_handler_func *nh_func; |
163 | o2net_msg_handler_func *nh_func_data; | 163 | o2net_msg_handler_func *nh_func_data; |
164 | o2net_post_msg_handler_func | ||
165 | *nh_post_func; | ||
164 | struct kref nh_kref; | 166 | struct kref nh_kref; |
165 | struct list_head nh_unregister_item; | 167 | struct list_head nh_unregister_item; |
166 | }; | 168 | }; |
diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index ad5e7e1fa1ff..241cad342a48 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c | |||
@@ -263,7 +263,8 @@ void dlm_do_local_bast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, | |||
263 | 263 | ||
264 | 264 | ||
265 | 265 | ||
266 | int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) | 266 | int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data, |
267 | void **ret_data) | ||
267 | { | 268 | { |
268 | int ret; | 269 | int ret; |
269 | unsigned int locklen; | 270 | unsigned int locklen; |
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index e95ecb2aaf14..2df6fde3e652 100644 --- a/fs/ocfs2/dlm/dlmcommon.h +++ b/fs/ocfs2/dlm/dlmcommon.h | |||
@@ -707,16 +707,20 @@ void dlm_lock_put(struct dlm_lock *lock); | |||
707 | void dlm_lock_attach_lockres(struct dlm_lock *lock, | 707 | void dlm_lock_attach_lockres(struct dlm_lock *lock, |
708 | struct dlm_lock_resource *res); | 708 | struct dlm_lock_resource *res); |
709 | 709 | ||
710 | int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data); | 710 | int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data, |
711 | int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data); | 711 | void **ret_data); |
712 | int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data); | 712 | int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data, |
713 | void **ret_data); | ||
714 | int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data, | ||
715 | void **ret_data); | ||
713 | 716 | ||
714 | void dlm_revert_pending_convert(struct dlm_lock_resource *res, | 717 | void dlm_revert_pending_convert(struct dlm_lock_resource *res, |
715 | struct dlm_lock *lock); | 718 | struct dlm_lock *lock); |
716 | void dlm_revert_pending_lock(struct dlm_lock_resource *res, | 719 | void dlm_revert_pending_lock(struct dlm_lock_resource *res, |
717 | struct dlm_lock *lock); | 720 | struct dlm_lock *lock); |
718 | 721 | ||
719 | int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data); | 722 | int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data, |
723 | void **ret_data); | ||
720 | void dlm_commit_pending_cancel(struct dlm_lock_resource *res, | 724 | void dlm_commit_pending_cancel(struct dlm_lock_resource *res, |
721 | struct dlm_lock *lock); | 725 | struct dlm_lock *lock); |
722 | void dlm_commit_pending_unlock(struct dlm_lock_resource *res, | 726 | void dlm_commit_pending_unlock(struct dlm_lock_resource *res, |
@@ -871,16 +875,26 @@ void dlm_lockres_release_ast(struct dlm_ctxt *dlm, | |||
871 | struct dlm_lock_resource *res); | 875 | struct dlm_lock_resource *res); |
872 | void __dlm_lockres_reserve_ast(struct dlm_lock_resource *res); | 876 | void __dlm_lockres_reserve_ast(struct dlm_lock_resource *res); |
873 | 877 | ||
874 | int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data); | 878 | int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data, |
875 | int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data); | 879 | void **ret_data); |
876 | int dlm_deref_lockres_handler(struct o2net_msg *msg, u32 len, void *data); | 880 | int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data, |
877 | int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data); | 881 | void **ret_data); |
878 | int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data); | 882 | int dlm_deref_lockres_handler(struct o2net_msg *msg, u32 len, void *data, |
879 | int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data); | 883 | void **ret_data); |
880 | int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data); | 884 | int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data, |
881 | int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data); | 885 | void **ret_data); |
882 | int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data); | 886 | int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data, |
883 | int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data); | 887 | void **ret_data); |
888 | int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data, | ||
889 | void **ret_data); | ||
890 | int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data, | ||
891 | void **ret_data); | ||
892 | int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data, | ||
893 | void **ret_data); | ||
894 | int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data, | ||
895 | void **ret_data); | ||
896 | int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data, | ||
897 | void **ret_data); | ||
884 | int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, | 898 | int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, |
885 | u8 nodenum, u8 *real_master); | 899 | u8 nodenum, u8 *real_master); |
886 | 900 | ||
diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c index 59fb63da8b65..ecb4d997221e 100644 --- a/fs/ocfs2/dlm/dlmconvert.c +++ b/fs/ocfs2/dlm/dlmconvert.c | |||
@@ -418,7 +418,8 @@ static enum dlm_status dlm_send_remote_convert_request(struct dlm_ctxt *dlm, | |||
418 | * returns: DLM_NORMAL, DLM_IVLOCKID, DLM_BADARGS, | 418 | * returns: DLM_NORMAL, DLM_IVLOCKID, DLM_BADARGS, |
419 | * status from __dlmconvert_master | 419 | * status from __dlmconvert_master |
420 | */ | 420 | */ |
421 | int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data) | 421 | int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data, |
422 | void **ret_data) | ||
422 | { | 423 | { |
423 | struct dlm_ctxt *dlm = data; | 424 | struct dlm_ctxt *dlm = data; |
424 | struct dlm_convert_lock *cnv = (struct dlm_convert_lock *)msg->buf; | 425 | struct dlm_convert_lock *cnv = (struct dlm_convert_lock *)msg->buf; |
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index 3995de360264..8a208b06fdd7 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c | |||
@@ -95,10 +95,14 @@ static DECLARE_WAIT_QUEUE_HEAD(dlm_domain_events); | |||
95 | 95 | ||
96 | #define DLM_DOMAIN_BACKOFF_MS 200 | 96 | #define DLM_DOMAIN_BACKOFF_MS 200 |
97 | 97 | ||
98 | static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data); | 98 | static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data, |
99 | static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data); | 99 | void **ret_data); |
100 | static int dlm_cancel_join_handler(struct o2net_msg *msg, u32 len, void *data); | 100 | static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data, |
101 | static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data); | 101 | void **ret_data); |
102 | static int dlm_cancel_join_handler(struct o2net_msg *msg, u32 len, void *data, | ||
103 | void **ret_data); | ||
104 | static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data, | ||
105 | void **ret_data); | ||
102 | 106 | ||
103 | static void dlm_unregister_domain_handlers(struct dlm_ctxt *dlm); | 107 | static void dlm_unregister_domain_handlers(struct dlm_ctxt *dlm); |
104 | 108 | ||
@@ -466,7 +470,8 @@ static void __dlm_print_nodes(struct dlm_ctxt *dlm) | |||
466 | printk("\n"); | 470 | printk("\n"); |
467 | } | 471 | } |
468 | 472 | ||
469 | static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data) | 473 | static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data, |
474 | void **ret_data) | ||
470 | { | 475 | { |
471 | struct dlm_ctxt *dlm = data; | 476 | struct dlm_ctxt *dlm = data; |
472 | unsigned int node; | 477 | unsigned int node; |
@@ -630,7 +635,8 @@ void dlm_unregister_domain(struct dlm_ctxt *dlm) | |||
630 | } | 635 | } |
631 | EXPORT_SYMBOL_GPL(dlm_unregister_domain); | 636 | EXPORT_SYMBOL_GPL(dlm_unregister_domain); |
632 | 637 | ||
633 | static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data) | 638 | static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data, |
639 | void **ret_data) | ||
634 | { | 640 | { |
635 | struct dlm_query_join_request *query; | 641 | struct dlm_query_join_request *query; |
636 | enum dlm_query_join_response response; | 642 | enum dlm_query_join_response response; |
@@ -707,7 +713,8 @@ respond: | |||
707 | return response; | 713 | return response; |
708 | } | 714 | } |
709 | 715 | ||
710 | static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data) | 716 | static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data, |
717 | void **ret_data) | ||
711 | { | 718 | { |
712 | struct dlm_assert_joined *assert; | 719 | struct dlm_assert_joined *assert; |
713 | struct dlm_ctxt *dlm = NULL; | 720 | struct dlm_ctxt *dlm = NULL; |
@@ -744,7 +751,8 @@ static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data) | |||
744 | return 0; | 751 | return 0; |
745 | } | 752 | } |
746 | 753 | ||
747 | static int dlm_cancel_join_handler(struct o2net_msg *msg, u32 len, void *data) | 754 | static int dlm_cancel_join_handler(struct o2net_msg *msg, u32 len, void *data, |
755 | void **ret_data) | ||
748 | { | 756 | { |
749 | struct dlm_cancel_join *cancel; | 757 | struct dlm_cancel_join *cancel; |
750 | struct dlm_ctxt *dlm = NULL; | 758 | struct dlm_ctxt *dlm = NULL; |
@@ -1086,105 +1094,105 @@ static int dlm_register_domain_handlers(struct dlm_ctxt *dlm) | |||
1086 | status = o2net_register_handler(DLM_MASTER_REQUEST_MSG, dlm->key, | 1094 | status = o2net_register_handler(DLM_MASTER_REQUEST_MSG, dlm->key, |
1087 | sizeof(struct dlm_master_request), | 1095 | sizeof(struct dlm_master_request), |
1088 | dlm_master_request_handler, | 1096 | dlm_master_request_handler, |
1089 | dlm, &dlm->dlm_domain_handlers); | 1097 | dlm, NULL, &dlm->dlm_domain_handlers); |
1090 | if (status) | 1098 | if (status) |
1091 | goto bail; | 1099 | goto bail; |
1092 | 1100 | ||
1093 | status = o2net_register_handler(DLM_ASSERT_MASTER_MSG, dlm->key, | 1101 | status = o2net_register_handler(DLM_ASSERT_MASTER_MSG, dlm->key, |
1094 | sizeof(struct dlm_assert_master), | 1102 | sizeof(struct dlm_assert_master), |
1095 | dlm_assert_master_handler, | 1103 | dlm_assert_master_handler, |
1096 | dlm, &dlm->dlm_domain_handlers); | 1104 | dlm, NULL, &dlm->dlm_domain_handlers); |
1097 | if (status) | 1105 | if (status) |
1098 | goto bail; | 1106 | goto bail; |
1099 | 1107 | ||
1100 | status = o2net_register_handler(DLM_CREATE_LOCK_MSG, dlm->key, | 1108 | status = o2net_register_handler(DLM_CREATE_LOCK_MSG, dlm->key, |
1101 | sizeof(struct dlm_create_lock), | 1109 | sizeof(struct dlm_create_lock), |
1102 | dlm_create_lock_handler, | 1110 | dlm_create_lock_handler, |
1103 | dlm, &dlm->dlm_domain_handlers); | 1111 | dlm, NULL, &dlm->dlm_domain_handlers); |
1104 | if (status) | 1112 | if (status) |
1105 | goto bail; | 1113 | goto bail; |
1106 | 1114 | ||
1107 | status = o2net_register_handler(DLM_CONVERT_LOCK_MSG, dlm->key, | 1115 | status = o2net_register_handler(DLM_CONVERT_LOCK_MSG, dlm->key, |
1108 | DLM_CONVERT_LOCK_MAX_LEN, | 1116 | DLM_CONVERT_LOCK_MAX_LEN, |
1109 | dlm_convert_lock_handler, | 1117 | dlm_convert_lock_handler, |
1110 | dlm, &dlm->dlm_domain_handlers); | 1118 | dlm, NULL, &dlm->dlm_domain_handlers); |
1111 | if (status) | 1119 | if (status) |
1112 | goto bail; | 1120 | goto bail; |
1113 | 1121 | ||
1114 | status = o2net_register_handler(DLM_UNLOCK_LOCK_MSG, dlm->key, | 1122 | status = o2net_register_handler(DLM_UNLOCK_LOCK_MSG, dlm->key, |
1115 | DLM_UNLOCK_LOCK_MAX_LEN, | 1123 | DLM_UNLOCK_LOCK_MAX_LEN, |
1116 | dlm_unlock_lock_handler, | 1124 | dlm_unlock_lock_handler, |
1117 | dlm, &dlm->dlm_domain_handlers); | 1125 | dlm, NULL, &dlm->dlm_domain_handlers); |
1118 | if (status) | 1126 | if (status) |
1119 | goto bail; | 1127 | goto bail; |
1120 | 1128 | ||
1121 | status = o2net_register_handler(DLM_PROXY_AST_MSG, dlm->key, | 1129 | status = o2net_register_handler(DLM_PROXY_AST_MSG, dlm->key, |
1122 | DLM_PROXY_AST_MAX_LEN, | 1130 | DLM_PROXY_AST_MAX_LEN, |
1123 | dlm_proxy_ast_handler, | 1131 | dlm_proxy_ast_handler, |
1124 | dlm, &dlm->dlm_domain_handlers); | 1132 | dlm, NULL, &dlm->dlm_domain_handlers); |
1125 | if (status) | 1133 | if (status) |
1126 | goto bail; | 1134 | goto bail; |
1127 | 1135 | ||
1128 | status = o2net_register_handler(DLM_EXIT_DOMAIN_MSG, dlm->key, | 1136 | status = o2net_register_handler(DLM_EXIT_DOMAIN_MSG, dlm->key, |
1129 | sizeof(struct dlm_exit_domain), | 1137 | sizeof(struct dlm_exit_domain), |
1130 | dlm_exit_domain_handler, | 1138 | dlm_exit_domain_handler, |
1131 | dlm, &dlm->dlm_domain_handlers); | 1139 | dlm, NULL, &dlm->dlm_domain_handlers); |
1132 | if (status) | 1140 | if (status) |
1133 | goto bail; | 1141 | goto bail; |
1134 | 1142 | ||
1135 | status = o2net_register_handler(DLM_DEREF_LOCKRES_MSG, dlm->key, | 1143 | status = o2net_register_handler(DLM_DEREF_LOCKRES_MSG, dlm->key, |
1136 | sizeof(struct dlm_deref_lockres), | 1144 | sizeof(struct dlm_deref_lockres), |
1137 | dlm_deref_lockres_handler, | 1145 | dlm_deref_lockres_handler, |
1138 | dlm, &dlm->dlm_domain_handlers); | 1146 | dlm, NULL, &dlm->dlm_domain_handlers); |
1139 | if (status) | 1147 | if (status) |
1140 | goto bail; | 1148 | goto bail; |
1141 | 1149 | ||
1142 | status = o2net_register_handler(DLM_MIGRATE_REQUEST_MSG, dlm->key, | 1150 | status = o2net_register_handler(DLM_MIGRATE_REQUEST_MSG, dlm->key, |
1143 | sizeof(struct dlm_migrate_request), | 1151 | sizeof(struct dlm_migrate_request), |
1144 | dlm_migrate_request_handler, | 1152 | dlm_migrate_request_handler, |
1145 | dlm, &dlm->dlm_domain_handlers); | 1153 | dlm, NULL, &dlm->dlm_domain_handlers); |
1146 | if (status) | 1154 | if (status) |
1147 | goto bail; | 1155 | goto bail; |
1148 | 1156 | ||
1149 | status = o2net_register_handler(DLM_MIG_LOCKRES_MSG, dlm->key, | 1157 | status = o2net_register_handler(DLM_MIG_LOCKRES_MSG, dlm->key, |
1150 | DLM_MIG_LOCKRES_MAX_LEN, | 1158 | DLM_MIG_LOCKRES_MAX_LEN, |
1151 | dlm_mig_lockres_handler, | 1159 | dlm_mig_lockres_handler, |
1152 | dlm, &dlm->dlm_domain_handlers); | 1160 | dlm, NULL, &dlm->dlm_domain_handlers); |
1153 | if (status) | 1161 | if (status) |
1154 | goto bail; | 1162 | goto bail; |
1155 | 1163 | ||
1156 | status = o2net_register_handler(DLM_MASTER_REQUERY_MSG, dlm->key, | 1164 | status = o2net_register_handler(DLM_MASTER_REQUERY_MSG, dlm->key, |
1157 | sizeof(struct dlm_master_requery), | 1165 | sizeof(struct dlm_master_requery), |
1158 | dlm_master_requery_handler, | 1166 | dlm_master_requery_handler, |
1159 | dlm, &dlm->dlm_domain_handlers); | 1167 | dlm, NULL, &dlm->dlm_domain_handlers); |
1160 | if (status) | 1168 | if (status) |
1161 | goto bail; | 1169 | goto bail; |
1162 | 1170 | ||
1163 | status = o2net_register_handler(DLM_LOCK_REQUEST_MSG, dlm->key, | 1171 | status = o2net_register_handler(DLM_LOCK_REQUEST_MSG, dlm->key, |
1164 | sizeof(struct dlm_lock_request), | 1172 | sizeof(struct dlm_lock_request), |
1165 | dlm_request_all_locks_handler, | 1173 | dlm_request_all_locks_handler, |
1166 | dlm, &dlm->dlm_domain_handlers); | 1174 | dlm, NULL, &dlm->dlm_domain_handlers); |
1167 | if (status) | 1175 | if (status) |
1168 | goto bail; | 1176 | goto bail; |
1169 | 1177 | ||
1170 | status = o2net_register_handler(DLM_RECO_DATA_DONE_MSG, dlm->key, | 1178 | status = o2net_register_handler(DLM_RECO_DATA_DONE_MSG, dlm->key, |
1171 | sizeof(struct dlm_reco_data_done), | 1179 | sizeof(struct dlm_reco_data_done), |
1172 | dlm_reco_data_done_handler, | 1180 | dlm_reco_data_done_handler, |
1173 | dlm, &dlm->dlm_domain_handlers); | 1181 | dlm, NULL, &dlm->dlm_domain_handlers); |
1174 | if (status) | 1182 | if (status) |
1175 | goto bail; | 1183 | goto bail; |
1176 | 1184 | ||
1177 | status = o2net_register_handler(DLM_BEGIN_RECO_MSG, dlm->key, | 1185 | status = o2net_register_handler(DLM_BEGIN_RECO_MSG, dlm->key, |
1178 | sizeof(struct dlm_begin_reco), | 1186 | sizeof(struct dlm_begin_reco), |
1179 | dlm_begin_reco_handler, | 1187 | dlm_begin_reco_handler, |
1180 | dlm, &dlm->dlm_domain_handlers); | 1188 | dlm, NULL, &dlm->dlm_domain_handlers); |
1181 | if (status) | 1189 | if (status) |
1182 | goto bail; | 1190 | goto bail; |
1183 | 1191 | ||
1184 | status = o2net_register_handler(DLM_FINALIZE_RECO_MSG, dlm->key, | 1192 | status = o2net_register_handler(DLM_FINALIZE_RECO_MSG, dlm->key, |
1185 | sizeof(struct dlm_finalize_reco), | 1193 | sizeof(struct dlm_finalize_reco), |
1186 | dlm_finalize_reco_handler, | 1194 | dlm_finalize_reco_handler, |
1187 | dlm, &dlm->dlm_domain_handlers); | 1195 | dlm, NULL, &dlm->dlm_domain_handlers); |
1188 | if (status) | 1196 | if (status) |
1189 | goto bail; | 1197 | goto bail; |
1190 | 1198 | ||
@@ -1478,21 +1486,21 @@ static int dlm_register_net_handlers(void) | |||
1478 | status = o2net_register_handler(DLM_QUERY_JOIN_MSG, DLM_MOD_KEY, | 1486 | status = o2net_register_handler(DLM_QUERY_JOIN_MSG, DLM_MOD_KEY, |
1479 | sizeof(struct dlm_query_join_request), | 1487 | sizeof(struct dlm_query_join_request), |
1480 | dlm_query_join_handler, | 1488 | dlm_query_join_handler, |
1481 | NULL, &dlm_join_handlers); | 1489 | NULL, NULL, &dlm_join_handlers); |
1482 | if (status) | 1490 | if (status) |
1483 | goto bail; | 1491 | goto bail; |
1484 | 1492 | ||
1485 | status = o2net_register_handler(DLM_ASSERT_JOINED_MSG, DLM_MOD_KEY, | 1493 | status = o2net_register_handler(DLM_ASSERT_JOINED_MSG, DLM_MOD_KEY, |
1486 | sizeof(struct dlm_assert_joined), | 1494 | sizeof(struct dlm_assert_joined), |
1487 | dlm_assert_joined_handler, | 1495 | dlm_assert_joined_handler, |
1488 | NULL, &dlm_join_handlers); | 1496 | NULL, NULL, &dlm_join_handlers); |
1489 | if (status) | 1497 | if (status) |
1490 | goto bail; | 1498 | goto bail; |
1491 | 1499 | ||
1492 | status = o2net_register_handler(DLM_CANCEL_JOIN_MSG, DLM_MOD_KEY, | 1500 | status = o2net_register_handler(DLM_CANCEL_JOIN_MSG, DLM_MOD_KEY, |
1493 | sizeof(struct dlm_cancel_join), | 1501 | sizeof(struct dlm_cancel_join), |
1494 | dlm_cancel_join_handler, | 1502 | dlm_cancel_join_handler, |
1495 | NULL, &dlm_join_handlers); | 1503 | NULL, NULL, &dlm_join_handlers); |
1496 | 1504 | ||
1497 | bail: | 1505 | bail: |
1498 | if (status < 0) | 1506 | if (status < 0) |
diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c index ac91a76b1e78..52578d907d9a 100644 --- a/fs/ocfs2/dlm/dlmlock.c +++ b/fs/ocfs2/dlm/dlmlock.c | |||
@@ -441,7 +441,8 @@ struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, | |||
441 | * held on exit: none | 441 | * held on exit: none |
442 | * returns: DLM_NORMAL, DLM_SYSERR, DLM_IVLOCKID, DLM_NOTQUEUED | 442 | * returns: DLM_NORMAL, DLM_SYSERR, DLM_IVLOCKID, DLM_NOTQUEUED |
443 | */ | 443 | */ |
444 | int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data) | 444 | int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data, |
445 | void **ret_data) | ||
445 | { | 446 | { |
446 | struct dlm_ctxt *dlm = data; | 447 | struct dlm_ctxt *dlm = data; |
447 | struct dlm_create_lock *create = (struct dlm_create_lock *)msg->buf; | 448 | struct dlm_create_lock *create = (struct dlm_create_lock *)msg->buf; |
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 6cfbdf282d46..bd1268778b66 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -1469,7 +1469,8 @@ out: | |||
1469 | * | 1469 | * |
1470 | * if possible, TRIM THIS DOWN!!! | 1470 | * if possible, TRIM THIS DOWN!!! |
1471 | */ | 1471 | */ |
1472 | int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data) | 1472 | int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data, |
1473 | void **ret_data) | ||
1473 | { | 1474 | { |
1474 | u8 response = DLM_MASTER_RESP_MAYBE; | 1475 | u8 response = DLM_MASTER_RESP_MAYBE; |
1475 | struct dlm_ctxt *dlm = data; | 1476 | struct dlm_ctxt *dlm = data; |
@@ -1800,7 +1801,8 @@ again: | |||
1800 | * | 1801 | * |
1801 | * if possible, TRIM THIS DOWN!!! | 1802 | * if possible, TRIM THIS DOWN!!! |
1802 | */ | 1803 | */ |
1803 | int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data) | 1804 | int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data, |
1805 | void **ret_data) | ||
1804 | { | 1806 | { |
1805 | struct dlm_ctxt *dlm = data; | 1807 | struct dlm_ctxt *dlm = data; |
1806 | struct dlm_master_list_entry *mle = NULL; | 1808 | struct dlm_master_list_entry *mle = NULL; |
@@ -2265,7 +2267,8 @@ int dlm_drop_lockres_ref(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) | |||
2265 | return ret; | 2267 | return ret; |
2266 | } | 2268 | } |
2267 | 2269 | ||
2268 | int dlm_deref_lockres_handler(struct o2net_msg *msg, u32 len, void *data) | 2270 | int dlm_deref_lockres_handler(struct o2net_msg *msg, u32 len, void *data, |
2271 | void **ret_data) | ||
2269 | { | 2272 | { |
2270 | struct dlm_ctxt *dlm = data; | 2273 | struct dlm_ctxt *dlm = data; |
2271 | struct dlm_deref_lockres *deref = (struct dlm_deref_lockres *)msg->buf; | 2274 | struct dlm_deref_lockres *deref = (struct dlm_deref_lockres *)msg->buf; |
@@ -2948,7 +2951,8 @@ static int dlm_do_migrate_request(struct dlm_ctxt *dlm, | |||
2948 | * we will have no mle in the list to start with. now we can add an mle for | 2951 | * we will have no mle in the list to start with. now we can add an mle for |
2949 | * the migration and this should be the only one found for those scanning the | 2952 | * the migration and this should be the only one found for those scanning the |
2950 | * list. */ | 2953 | * list. */ |
2951 | int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data) | 2954 | int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data, |
2955 | void **ret_data) | ||
2952 | { | 2956 | { |
2953 | struct dlm_ctxt *dlm = data; | 2957 | struct dlm_ctxt *dlm = data; |
2954 | struct dlm_lock_resource *res = NULL; | 2958 | struct dlm_lock_resource *res = NULL; |
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 38d714645309..6d4a83d50152 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c | |||
@@ -818,7 +818,8 @@ static int dlm_request_all_locks(struct dlm_ctxt *dlm, u8 request_from, | |||
818 | 818 | ||
819 | } | 819 | } |
820 | 820 | ||
821 | int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data) | 821 | int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data, |
822 | void **ret_data) | ||
822 | { | 823 | { |
823 | struct dlm_ctxt *dlm = data; | 824 | struct dlm_ctxt *dlm = data; |
824 | struct dlm_lock_request *lr = (struct dlm_lock_request *)msg->buf; | 825 | struct dlm_lock_request *lr = (struct dlm_lock_request *)msg->buf; |
@@ -975,7 +976,8 @@ static int dlm_send_all_done_msg(struct dlm_ctxt *dlm, u8 dead_node, u8 send_to) | |||
975 | } | 976 | } |
976 | 977 | ||
977 | 978 | ||
978 | int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data) | 979 | int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data, |
980 | void **ret_data) | ||
979 | { | 981 | { |
980 | struct dlm_ctxt *dlm = data; | 982 | struct dlm_ctxt *dlm = data; |
981 | struct dlm_reco_data_done *done = (struct dlm_reco_data_done *)msg->buf; | 983 | struct dlm_reco_data_done *done = (struct dlm_reco_data_done *)msg->buf; |
@@ -1331,7 +1333,8 @@ error: | |||
1331 | * do we spin? returning an error only delays the problem really | 1333 | * do we spin? returning an error only delays the problem really |
1332 | */ | 1334 | */ |
1333 | 1335 | ||
1334 | int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data) | 1336 | int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data, |
1337 | void **ret_data) | ||
1335 | { | 1338 | { |
1336 | struct dlm_ctxt *dlm = data; | 1339 | struct dlm_ctxt *dlm = data; |
1337 | struct dlm_migratable_lockres *mres = | 1340 | struct dlm_migratable_lockres *mres = |
@@ -1624,7 +1627,8 @@ int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, | |||
1624 | /* this function cannot error, so unless the sending | 1627 | /* this function cannot error, so unless the sending |
1625 | * or receiving of the message failed, the owner can | 1628 | * or receiving of the message failed, the owner can |
1626 | * be trusted */ | 1629 | * be trusted */ |
1627 | int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data) | 1630 | int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data, |
1631 | void **ret_data) | ||
1628 | { | 1632 | { |
1629 | struct dlm_ctxt *dlm = data; | 1633 | struct dlm_ctxt *dlm = data; |
1630 | struct dlm_master_requery *req = (struct dlm_master_requery *)msg->buf; | 1634 | struct dlm_master_requery *req = (struct dlm_master_requery *)msg->buf; |
@@ -2600,7 +2604,8 @@ retry: | |||
2600 | return ret; | 2604 | return ret; |
2601 | } | 2605 | } |
2602 | 2606 | ||
2603 | int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data) | 2607 | int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data, |
2608 | void **ret_data) | ||
2604 | { | 2609 | { |
2605 | struct dlm_ctxt *dlm = data; | 2610 | struct dlm_ctxt *dlm = data; |
2606 | struct dlm_begin_reco *br = (struct dlm_begin_reco *)msg->buf; | 2611 | struct dlm_begin_reco *br = (struct dlm_begin_reco *)msg->buf; |
@@ -2728,7 +2733,8 @@ stage2: | |||
2728 | return ret; | 2733 | return ret; |
2729 | } | 2734 | } |
2730 | 2735 | ||
2731 | int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data) | 2736 | int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data, |
2737 | void **ret_data) | ||
2732 | { | 2738 | { |
2733 | struct dlm_ctxt *dlm = data; | 2739 | struct dlm_ctxt *dlm = data; |
2734 | struct dlm_finalize_reco *fr = (struct dlm_finalize_reco *)msg->buf; | 2740 | struct dlm_finalize_reco *fr = (struct dlm_finalize_reco *)msg->buf; |
diff --git a/fs/ocfs2/dlm/dlmunlock.c b/fs/ocfs2/dlm/dlmunlock.c index fc8baa3e9539..86ca085ef324 100644 --- a/fs/ocfs2/dlm/dlmunlock.c +++ b/fs/ocfs2/dlm/dlmunlock.c | |||
@@ -383,7 +383,8 @@ static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm, | |||
383 | * returns: DLM_NORMAL, DLM_BADARGS, DLM_IVLOCKID, | 383 | * returns: DLM_NORMAL, DLM_BADARGS, DLM_IVLOCKID, |
384 | * return value from dlmunlock_master | 384 | * return value from dlmunlock_master |
385 | */ | 385 | */ |
386 | int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data) | 386 | int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data, |
387 | void **ret_data) | ||
387 | { | 388 | { |
388 | struct dlm_ctxt *dlm = data; | 389 | struct dlm_ctxt *dlm = data; |
389 | struct dlm_unlock_lock *unlock = (struct dlm_unlock_lock *)msg->buf; | 390 | struct dlm_unlock_lock *unlock = (struct dlm_unlock_lock *)msg->buf; |
diff --git a/fs/ocfs2/vote.c b/fs/ocfs2/vote.c index 0afd8b9af70f..f30e63b9910c 100644 --- a/fs/ocfs2/vote.c +++ b/fs/ocfs2/vote.c | |||
@@ -887,7 +887,7 @@ static inline int ocfs2_translate_response(int response) | |||
887 | 887 | ||
888 | static int ocfs2_handle_response_message(struct o2net_msg *msg, | 888 | static int ocfs2_handle_response_message(struct o2net_msg *msg, |
889 | u32 len, | 889 | u32 len, |
890 | void *data) | 890 | void *data, void **ret_data) |
891 | { | 891 | { |
892 | unsigned int response_id, node_num; | 892 | unsigned int response_id, node_num; |
893 | int response_status; | 893 | int response_status; |
@@ -943,7 +943,7 @@ bail: | |||
943 | 943 | ||
944 | static int ocfs2_handle_vote_message(struct o2net_msg *msg, | 944 | static int ocfs2_handle_vote_message(struct o2net_msg *msg, |
945 | u32 len, | 945 | u32 len, |
946 | void *data) | 946 | void *data, void **ret_data) |
947 | { | 947 | { |
948 | int status; | 948 | int status; |
949 | struct ocfs2_super *osb = data; | 949 | struct ocfs2_super *osb = data; |
@@ -1007,7 +1007,7 @@ int ocfs2_register_net_handlers(struct ocfs2_super *osb) | |||
1007 | osb->net_key, | 1007 | osb->net_key, |
1008 | sizeof(struct ocfs2_response_msg), | 1008 | sizeof(struct ocfs2_response_msg), |
1009 | ocfs2_handle_response_message, | 1009 | ocfs2_handle_response_message, |
1010 | osb, &osb->osb_net_handlers); | 1010 | osb, NULL, &osb->osb_net_handlers); |
1011 | if (status) { | 1011 | if (status) { |
1012 | mlog_errno(status); | 1012 | mlog_errno(status); |
1013 | goto bail; | 1013 | goto bail; |
@@ -1017,7 +1017,7 @@ int ocfs2_register_net_handlers(struct ocfs2_super *osb) | |||
1017 | osb->net_key, | 1017 | osb->net_key, |
1018 | sizeof(struct ocfs2_vote_msg), | 1018 | sizeof(struct ocfs2_vote_msg), |
1019 | ocfs2_handle_vote_message, | 1019 | ocfs2_handle_vote_message, |
1020 | osb, &osb->osb_net_handlers); | 1020 | osb, NULL, &osb->osb_net_handlers); |
1021 | if (status) { | 1021 | if (status) { |
1022 | mlog_errno(status); | 1022 | mlog_errno(status); |
1023 | goto bail; | 1023 | goto bail; |