summaryrefslogtreecommitdiff
path: root/fs/dlm
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2022-11-18 01:11:45 +0300
committerDavid Teigland <teigland@redhat.com>2022-11-21 18:45:49 +0300
commit17827754e503d6c72b05a1c4603469ec9bf35d48 (patch)
treef61973b4a8662a67719dc912749348afb9f9dff7 /fs/dlm
parent81889255c2e6ed1eef448375b5d6330a2f1453de (diff)
downloadlinux-17827754e503d6c72b05a1c4603469ec9bf35d48.tar.xz
fs: dlm: add dst nodeid for msg tracing
In DLM when we send a dlm message it is easy to add the lock resource name, but additional lookup is required when to trace the receive message side. The idea here is to move the lookup work to the user by using a lookup to find the right send message with recv message. As note DLM can't drop any message which is guaranteed by a special session layer. For doing the lookup a 3 tupel is required as an unique identification which is dst nodeid, src nodeid and sequence number. This patch adds the destination nodeid to the dlm message trace points. The source nodeid is given by the h_nodeid field inside the header. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/midcomms.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/dlm/midcomms.c b/fs/dlm/midcomms.c
index 32194a750fe1..960def5ab530 100644
--- a/fs/dlm/midcomms.c
+++ b/fs/dlm/midcomms.c
@@ -479,10 +479,10 @@ static void dlm_receive_buffer_3_2_trace(uint32_t seq, union dlm_packet *p)
{
switch (p->header.h_cmd) {
case DLM_MSG:
- trace_dlm_recv_message(seq, &p->message);
+ trace_dlm_recv_message(dlm_our_nodeid(), seq, &p->message);
break;
case DLM_RCOM:
- trace_dlm_recv_rcom(seq, &p->rcom);
+ trace_dlm_recv_rcom(dlm_our_nodeid(), seq, &p->rcom);
break;
default:
break;
@@ -1151,11 +1151,13 @@ static void dlm_midcomms_commit_msg_3_2_trace(const struct dlm_mhandle *mh,
{
switch (mh->inner_p->header.h_cmd) {
case DLM_MSG:
- trace_dlm_send_message(mh->seq, &mh->inner_p->message,
+ trace_dlm_send_message(mh->node->nodeid, mh->seq,
+ &mh->inner_p->message,
name, namelen);
break;
case DLM_RCOM:
- trace_dlm_send_rcom(mh->seq, &mh->inner_p->rcom);
+ trace_dlm_send_rcom(mh->node->nodeid, mh->seq,
+ &mh->inner_p->rcom);
break;
default:
/* nothing to trace */