ocfs2: Added post handler callable function in o2net message handler
authorKurt Hackel <kurt.hackel@oracle.com>
Thu, 18 Jan 2007 01:04:25 +0000 (17:04 -0800)
committerMark Fasheh <mark.fasheh@oracle.com>
Wed, 7 Feb 2007 20:06:56 +0000 (12:06 -0800)
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>
12 files changed:
fs/ocfs2/cluster/tcp.c
fs/ocfs2/cluster/tcp.h
fs/ocfs2/cluster/tcp_internal.h
fs/ocfs2/dlm/dlmast.c
fs/ocfs2/dlm/dlmcommon.h
fs/ocfs2/dlm/dlmconvert.c
fs/ocfs2/dlm/dlmdomain.c
fs/ocfs2/dlm/dlmlock.c
fs/ocfs2/dlm/dlmmaster.c
fs/ocfs2/dlm/dlmrecovery.c
fs/ocfs2/dlm/dlmunlock.c
fs/ocfs2/vote.c

index ae4ff4a6636b23759522994898a95c148a4401f1..7700418d25ecb5350c69cc564b3c65378bee6ced 100644 (file)
@@ -688,6 +688,7 @@ static void o2net_handler_put(struct o2net_msg_handler *nmh)
  * be given to the handler if their payload is longer than the max. */
 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)
 {
        struct o2net_msg_handler *nmh = NULL;
@@ -722,6 +723,7 @@ int o2net_register_handler(u32 msg_type, u32 key, u32 max_len,
 
        nmh->nh_func = func;
        nmh->nh_func_data = data;
+       nmh->nh_post_func = post_func;
        nmh->nh_msg_type = msg_type;
        nmh->nh_max_len = max_len;
        nmh->nh_key = key;
@@ -1049,6 +1051,7 @@ static int o2net_process_message(struct o2net_sock_container *sc,
        int ret = 0, handler_status;
        enum  o2net_system_error syserr;
        struct o2net_msg_handler *nmh = NULL;
+       void *ret_data = NULL;
 
        msglog(hdr, "processing message\n");
 
@@ -1101,7 +1104,7 @@ static int o2net_process_message(struct o2net_sock_container *sc,
        sc->sc_msg_type = be16_to_cpu(hdr->msg_type);
        handler_status = (nmh->nh_func)(hdr, sizeof(struct o2net_msg) +
                                             be16_to_cpu(hdr->data_len),
-                                       nmh->nh_func_data);
+                                       nmh->nh_func_data, &ret_data);
        do_gettimeofday(&sc->sc_tv_func_stop);
 
 out_respond:
@@ -1112,6 +1115,13 @@ out_respond:
        mlog(0, "sending handler status %d, syserr %d returned %d\n",
             handler_status, syserr, ret);
 
+       if (nmh) {
+               BUG_ON(ret_data != NULL && nmh->nh_post_func == NULL);
+               if (nmh->nh_post_func)
+                       (nmh->nh_post_func)(handler_status, nmh->nh_func_data,
+                                           ret_data);
+       }
+
 out:
        if (nmh)
                o2net_handler_put(nmh);
index 21a4e43df836159c177771974ffc215957d26bf3..da880fc215f075ccc50aac915810409b8efd35e4 100644 (file)
@@ -50,7 +50,10 @@ 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))
 
@@ -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);
 
index 775c911342f4ddaab9444a6f16559e77f03f4e5b..d74040fac343643e3895871dfaa238bd14da3b45 100644 (file)
@@ -161,6 +161,8 @@ struct o2net_msg_handler {
        u32                     nh_key;
        o2net_msg_handler_func  *nh_func;
        o2net_msg_handler_func  *nh_func_data;
+       o2net_post_msg_handler_func
+                               *nh_post_func;
        struct kref             nh_kref;
        struct list_head        nh_unregister_item;
 };
index ad5e7e1fa1ff6ece40f8beb0a25e1553c61515cc..241cad342a48f0f8849cca96e1ddf5f2f6aee79e 100644 (file)
@@ -263,7 +263,8 @@ void dlm_do_local_bast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
 
 
 
-int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data,
+                         void **ret_data)
 {
        int ret;
        unsigned int locklen;
index e95ecb2aaf1493fd0caa523d9feed48ca46a6d40..2df6fde3e6528c4104459961b6516c66a5ab775c 100644 (file)
@@ -707,16 +707,20 @@ void dlm_lock_put(struct dlm_lock *lock);
 void dlm_lock_attach_lockres(struct dlm_lock *lock,
                             struct dlm_lock_resource *res);
 
-int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data);
-int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data);
-int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data,
+                           void **ret_data);
+int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data,
+                            void **ret_data);
+int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data,
+                         void **ret_data);
 
 void dlm_revert_pending_convert(struct dlm_lock_resource *res,
                                struct dlm_lock *lock);
 void dlm_revert_pending_lock(struct dlm_lock_resource *res,
                             struct dlm_lock *lock);
 
-int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data,
+                           void **ret_data);
 void dlm_commit_pending_cancel(struct dlm_lock_resource *res,
                               struct dlm_lock *lock);
 void dlm_commit_pending_unlock(struct dlm_lock_resource *res,
@@ -871,16 +875,26 @@ void dlm_lockres_release_ast(struct dlm_ctxt *dlm,
                             struct dlm_lock_resource *res);
 void __dlm_lockres_reserve_ast(struct dlm_lock_resource *res);
 
-int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data);
-int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data);
-int dlm_deref_lockres_handler(struct o2net_msg *msg, u32 len, void *data);
-int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data);
-int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data);
-int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data);
-int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data);
-int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data);
-int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data);
-int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data,
+                              void **ret_data);
+int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data,
+                             void **ret_data);
+int dlm_deref_lockres_handler(struct o2net_msg *msg, u32 len, void *data,
+                             void **ret_data);
+int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data,
+                               void **ret_data);
+int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data,
+                           void **ret_data);
+int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data,
+                              void **ret_data);
+int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data,
+                                 void **ret_data);
+int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data,
+                              void **ret_data);
+int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data,
+                          void **ret_data);
+int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data,
+                             void **ret_data);
 int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
                          u8 nodenum, u8 *real_master);
 
index 59fb63da8b659b590f6fcca1a950f4b27aba35d2..ecb4d997221e6460b33efa9e2747bda6b78fa3bb 100644 (file)
@@ -418,7 +418,8 @@ static enum dlm_status dlm_send_remote_convert_request(struct dlm_ctxt *dlm,
  * returns: DLM_NORMAL, DLM_IVLOCKID, DLM_BADARGS,
  *          status from __dlmconvert_master
  */
-int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data,
+                            void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        struct dlm_convert_lock *cnv = (struct dlm_convert_lock *)msg->buf;
index 3995de360264676bf253a3f04652a0d9921220a8..8a208b06fdd770824477c160354b90c25591cd92 100644 (file)
@@ -95,10 +95,14 @@ static DECLARE_WAIT_QUEUE_HEAD(dlm_domain_events);
 
 #define DLM_DOMAIN_BACKOFF_MS 200
 
-static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data);
-static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data);
-static int dlm_cancel_join_handler(struct o2net_msg *msg, u32 len, void *data);
-static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data);
+static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data,
+                                 void **ret_data);
+static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data,
+                                    void **ret_data);
+static int dlm_cancel_join_handler(struct o2net_msg *msg, u32 len, void *data,
+                                  void **ret_data);
+static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data,
+                                  void **ret_data);
 
 static void dlm_unregister_domain_handlers(struct dlm_ctxt *dlm);
 
@@ -466,7 +470,8 @@ static void __dlm_print_nodes(struct dlm_ctxt *dlm)
        printk("\n");
 }
 
-static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data)
+static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data,
+                                  void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        unsigned int node;
@@ -630,7 +635,8 @@ void dlm_unregister_domain(struct dlm_ctxt *dlm)
 }
 EXPORT_SYMBOL_GPL(dlm_unregister_domain);
 
-static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data)
+static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data,
+                                 void **ret_data)
 {
        struct dlm_query_join_request *query;
        enum dlm_query_join_response response;
@@ -707,7 +713,8 @@ respond:
        return response;
 }
 
-static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data)
+static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data,
+                                    void **ret_data)
 {
        struct dlm_assert_joined *assert;
        struct dlm_ctxt *dlm = NULL;
@@ -744,7 +751,8 @@ static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data)
        return 0;
 }
 
-static int dlm_cancel_join_handler(struct o2net_msg *msg, u32 len, void *data)
+static int dlm_cancel_join_handler(struct o2net_msg *msg, u32 len, void *data,
+                                  void **ret_data)
 {
        struct dlm_cancel_join *cancel;
        struct dlm_ctxt *dlm = NULL;
@@ -1086,105 +1094,105 @@ static int dlm_register_domain_handlers(struct dlm_ctxt *dlm)
        status = o2net_register_handler(DLM_MASTER_REQUEST_MSG, dlm->key,
                                        sizeof(struct dlm_master_request),
                                        dlm_master_request_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_ASSERT_MASTER_MSG, dlm->key,
                                        sizeof(struct dlm_assert_master),
                                        dlm_assert_master_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_CREATE_LOCK_MSG, dlm->key,
                                        sizeof(struct dlm_create_lock),
                                        dlm_create_lock_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_CONVERT_LOCK_MSG, dlm->key,
                                        DLM_CONVERT_LOCK_MAX_LEN,
                                        dlm_convert_lock_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_UNLOCK_LOCK_MSG, dlm->key,
                                        DLM_UNLOCK_LOCK_MAX_LEN,
                                        dlm_unlock_lock_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_PROXY_AST_MSG, dlm->key,
                                        DLM_PROXY_AST_MAX_LEN,
                                        dlm_proxy_ast_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_EXIT_DOMAIN_MSG, dlm->key,
                                        sizeof(struct dlm_exit_domain),
                                        dlm_exit_domain_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_DEREF_LOCKRES_MSG, dlm->key,
                                        sizeof(struct dlm_deref_lockres),
                                        dlm_deref_lockres_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_MIGRATE_REQUEST_MSG, dlm->key,
                                        sizeof(struct dlm_migrate_request),
                                        dlm_migrate_request_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_MIG_LOCKRES_MSG, dlm->key,
                                        DLM_MIG_LOCKRES_MAX_LEN,
                                        dlm_mig_lockres_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_MASTER_REQUERY_MSG, dlm->key,
                                        sizeof(struct dlm_master_requery),
                                        dlm_master_requery_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_LOCK_REQUEST_MSG, dlm->key,
                                        sizeof(struct dlm_lock_request),
                                        dlm_request_all_locks_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_RECO_DATA_DONE_MSG, dlm->key,
                                        sizeof(struct dlm_reco_data_done),
                                        dlm_reco_data_done_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_BEGIN_RECO_MSG, dlm->key,
                                        sizeof(struct dlm_begin_reco),
                                        dlm_begin_reco_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_FINALIZE_RECO_MSG, dlm->key,
                                        sizeof(struct dlm_finalize_reco),
                                        dlm_finalize_reco_handler,
-                                       dlm, &dlm->dlm_domain_handlers);
+                                       dlm, NULL, &dlm->dlm_domain_handlers);
        if (status)
                goto bail;
 
@@ -1478,21 +1486,21 @@ static int dlm_register_net_handlers(void)
        status = o2net_register_handler(DLM_QUERY_JOIN_MSG, DLM_MOD_KEY,
                                        sizeof(struct dlm_query_join_request),
                                        dlm_query_join_handler,
-                                       NULL, &dlm_join_handlers);
+                                       NULL, NULL, &dlm_join_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_ASSERT_JOINED_MSG, DLM_MOD_KEY,
                                        sizeof(struct dlm_assert_joined),
                                        dlm_assert_joined_handler,
-                                       NULL, &dlm_join_handlers);
+                                       NULL, NULL, &dlm_join_handlers);
        if (status)
                goto bail;
 
        status = o2net_register_handler(DLM_CANCEL_JOIN_MSG, DLM_MOD_KEY,
                                        sizeof(struct dlm_cancel_join),
                                        dlm_cancel_join_handler,
-                                       NULL, &dlm_join_handlers);
+                                       NULL, NULL, &dlm_join_handlers);
 
 bail:
        if (status < 0)
index ac91a76b1e781e4997435b1286c55725e99f555a..52578d907d9ae3518d9c2106ea3f0ce559a0be2e 100644 (file)
@@ -441,7 +441,8 @@ struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie,
  *   held on exit:  none
  * returns: DLM_NORMAL, DLM_SYSERR, DLM_IVLOCKID, DLM_NOTQUEUED
  */
-int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data,
+                           void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        struct dlm_create_lock *create = (struct dlm_create_lock *)msg->buf;
index 6cfbdf282d467e0186fb2e274412ad2e9878b623..bd1268778b660b5b54e28589f33ada63e2445540 100644 (file)
@@ -1469,7 +1469,8 @@ out:
  *
  * if possible, TRIM THIS DOWN!!!
  */
-int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data,
+                              void **ret_data)
 {
        u8 response = DLM_MASTER_RESP_MAYBE;
        struct dlm_ctxt *dlm = data;
@@ -1800,7 +1801,8 @@ again:
  *
  * if possible, TRIM THIS DOWN!!!
  */
-int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data,
+                             void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        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)
        return ret;
 }
 
-int dlm_deref_lockres_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_deref_lockres_handler(struct o2net_msg *msg, u32 len, void *data,
+                             void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        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,
  * we will have no mle in the list to start with.  now we can add an mle for
  * the migration and this should be the only one found for those scanning the
  * list.  */
-int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data,
+                               void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        struct dlm_lock_resource *res = NULL;
index 38d7146453096e316f9a78affb10193f0e9e5b7a..6d4a83d50152bf2d7e80ab2dc06380aee1ffdf43 100644 (file)
@@ -818,7 +818,8 @@ static int dlm_request_all_locks(struct dlm_ctxt *dlm, u8 request_from,
 
 }
 
-int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data,
+                                 void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        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)
 }
 
 
-int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data,
+                              void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        struct dlm_reco_data_done *done = (struct dlm_reco_data_done *)msg->buf;
@@ -1331,7 +1333,8 @@ error:
  * do we spin?  returning an error only delays the problem really
  */
 
-int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data,
+                           void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        struct dlm_migratable_lockres *mres =
@@ -1624,7 +1627,8 @@ int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
 /* this function cannot error, so unless the sending
  * or receiving of the message failed, the owner can
  * be trusted */
-int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data,
+                              void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        struct dlm_master_requery *req = (struct dlm_master_requery *)msg->buf;
@@ -2600,7 +2604,8 @@ retry:
        return ret;
 }
 
-int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data,
+                          void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        struct dlm_begin_reco *br = (struct dlm_begin_reco *)msg->buf;
@@ -2728,7 +2733,8 @@ stage2:
        return ret;
 }
 
-int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data,
+                             void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        struct dlm_finalize_reco *fr = (struct dlm_finalize_reco *)msg->buf;
index fc8baa3e95396060bf60bedc37a52a4c732361a2..86ca085ef3246b8066d7f9f976b0866e7e63e168 100644 (file)
@@ -383,7 +383,8 @@ static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm,
  * returns: DLM_NORMAL, DLM_BADARGS, DLM_IVLOCKID,
  *          return value from dlmunlock_master
  */
-int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data)
+int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data,
+                           void **ret_data)
 {
        struct dlm_ctxt *dlm = data;
        struct dlm_unlock_lock *unlock = (struct dlm_unlock_lock *)msg->buf;
index 0afd8b9af70fa3691c2a98c3c66716d259982cda..f30e63b9910c4610fce6bf8161ff6ce31b3d7f5b 100644 (file)
@@ -887,7 +887,7 @@ static inline int ocfs2_translate_response(int response)
 
 static int ocfs2_handle_response_message(struct o2net_msg *msg,
                                         u32 len,
-                                        void *data)
+                                        void *data, void **ret_data)
 {
        unsigned int response_id, node_num;
        int response_status;
@@ -943,7 +943,7 @@ bail:
 
 static int ocfs2_handle_vote_message(struct o2net_msg *msg,
                                     u32 len,
-                                    void *data)
+                                    void *data, void **ret_data)
 {
        int status;
        struct ocfs2_super *osb = data;
@@ -1007,7 +1007,7 @@ int ocfs2_register_net_handlers(struct ocfs2_super *osb)
                                        osb->net_key,
                                        sizeof(struct ocfs2_response_msg),
                                        ocfs2_handle_response_message,
-                                       osb, &osb->osb_net_handlers);
+                                       osb, NULL, &osb->osb_net_handlers);
        if (status) {
                mlog_errno(status);
                goto bail;
@@ -1017,7 +1017,7 @@ int ocfs2_register_net_handlers(struct ocfs2_super *osb)
                                        osb->net_key,
                                        sizeof(struct ocfs2_vote_msg),
                                        ocfs2_handle_vote_message,
-                                       osb, &osb->osb_net_handlers);
+                                       osb, NULL, &osb->osb_net_handlers);
        if (status) {
                mlog_errno(status);
                goto bail;
This page took 0.047206 seconds and 5 git commands to generate.