diff options
author | Wengang Wang <wen.gang.wang@oracle.com> | 2010-03-30 00:09:22 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-05-05 21:18:08 -0400 |
commit | a5196ec5ef80309fd390191c548ee1f2e8a327ee (patch) | |
tree | 5856168bc2708230107940ec73a6752fabd8fd7b /fs/ocfs2/dlm/dlmdomain.c | |
parent | 83f92318fa33cc084e14e64dc903e605f75884c1 (diff) |
ocfs2: print node # when tcp fails
Print the node number of a peer node if sending it a message failed.
Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmdomain.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmdomain.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index 988c9055fd4e..eb50be0288f2 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c | |||
@@ -565,7 +565,9 @@ static int dlm_send_one_domain_exit(struct dlm_ctxt *dlm, | |||
565 | status = o2net_send_message(DLM_EXIT_DOMAIN_MSG, dlm->key, | 565 | status = o2net_send_message(DLM_EXIT_DOMAIN_MSG, dlm->key, |
566 | &leave_msg, sizeof(leave_msg), node, | 566 | &leave_msg, sizeof(leave_msg), node, |
567 | NULL); | 567 | NULL); |
568 | 568 | if (status < 0) | |
569 | mlog(ML_ERROR, "Error %d when sending message %u (key 0x%x) to " | ||
570 | "node %u\n", status, DLM_EXIT_DOMAIN_MSG, dlm->key, node); | ||
569 | mlog(0, "status return %d from o2net_send_message\n", status); | 571 | mlog(0, "status return %d from o2net_send_message\n", status); |
570 | 572 | ||
571 | return status; | 573 | return status; |
@@ -962,7 +964,9 @@ static int dlm_send_one_join_cancel(struct dlm_ctxt *dlm, | |||
962 | &cancel_msg, sizeof(cancel_msg), node, | 964 | &cancel_msg, sizeof(cancel_msg), node, |
963 | NULL); | 965 | NULL); |
964 | if (status < 0) { | 966 | if (status < 0) { |
965 | mlog_errno(status); | 967 | mlog(ML_ERROR, "Error %d when sending message %u (key 0x%x) to " |
968 | "node %u\n", status, DLM_CANCEL_JOIN_MSG, DLM_MOD_KEY, | ||
969 | node); | ||
966 | goto bail; | 970 | goto bail; |
967 | } | 971 | } |
968 | 972 | ||
@@ -1029,10 +1033,11 @@ static int dlm_request_join(struct dlm_ctxt *dlm, | |||
1029 | byte_copymap(join_msg.node_map, dlm->live_nodes_map, O2NM_MAX_NODES); | 1033 | byte_copymap(join_msg.node_map, dlm->live_nodes_map, O2NM_MAX_NODES); |
1030 | 1034 | ||
1031 | status = o2net_send_message(DLM_QUERY_JOIN_MSG, DLM_MOD_KEY, &join_msg, | 1035 | status = o2net_send_message(DLM_QUERY_JOIN_MSG, DLM_MOD_KEY, &join_msg, |
1032 | sizeof(join_msg), node, | 1036 | sizeof(join_msg), node, &join_resp); |
1033 | &join_resp); | ||
1034 | if (status < 0 && status != -ENOPROTOOPT) { | 1037 | if (status < 0 && status != -ENOPROTOOPT) { |
1035 | mlog_errno(status); | 1038 | mlog(ML_ERROR, "Error %d when sending message %u (key 0x%x) to " |
1039 | "node %u\n", status, DLM_QUERY_JOIN_MSG, DLM_MOD_KEY, | ||
1040 | node); | ||
1036 | goto bail; | 1041 | goto bail; |
1037 | } | 1042 | } |
1038 | dlm_query_join_wire_to_packet(join_resp, &packet); | 1043 | dlm_query_join_wire_to_packet(join_resp, &packet); |
@@ -1103,7 +1108,9 @@ static int dlm_send_one_join_assert(struct dlm_ctxt *dlm, | |||
1103 | &assert_msg, sizeof(assert_msg), node, | 1108 | &assert_msg, sizeof(assert_msg), node, |
1104 | NULL); | 1109 | NULL); |
1105 | if (status < 0) | 1110 | if (status < 0) |
1106 | mlog_errno(status); | 1111 | mlog(ML_ERROR, "Error %d when sending message %u (key 0x%x) to " |
1112 | "node %u\n", status, DLM_ASSERT_JOINED_MSG, DLM_MOD_KEY, | ||
1113 | node); | ||
1107 | 1114 | ||
1108 | return status; | 1115 | return status; |
1109 | } | 1116 | } |