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/dlm/dlmmaster.c | |
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/dlm/dlmmaster.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 12 |
1 files changed, 8 insertions, 4 deletions
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; |