* [PATCH] cifs: Add a couple of missing smb3_rw_credits tracepoints
@ 2025-10-20 9:37 David Howells
0 siblings, 0 replies; only message in thread
From: David Howells @ 2025-10-20 9:37 UTC (permalink / raw)
To: Steve French
Cc: dhowells, Paulo Alcantara, Shyam Prasad N, Tom Talpey, linux-cifs,
linux-fsdevel, linux-kernel
Add missing smb3_rw_credits tracepoints to cifs_readv_callback() (for SMB1)
to match those of SMB2/3.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <sfrench@samba.org>
cc: Paulo Alcantara <pc@manguebit.org>
cc: Shyam Prasad N <sprasad@microsoft.com>
cc: Tom Talpey <tom@talpey.com>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
---
fs/smb/client/cifssmb.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fs/smb/client/cifssmb.c b/fs/smb/client/cifssmb.c
index 7368479ac9c4..6acec5a229ac 100644
--- a/fs/smb/client/cifssmb.c
+++ b/fs/smb/client/cifssmb.c
@@ -1294,6 +1294,8 @@ cifs_readv_callback(struct TCP_Server_Info *server, struct smb_message *smb)
.rreq_debug_id = rdata->rreq->debug_id,
.rreq_debug_index = rdata->subreq.debug_index,
};
+ unsigned int rreq_debug_id = rdata->rreq->debug_id;
+ unsigned int subreq_debug_index = rdata->subreq.debug_index;
cifs_dbg(FYI, "%s: mid=%llu state=%d result=%d bytes=%zu\n",
__func__, smb->mid, smb->mid_state, rdata->result,
@@ -1357,12 +1359,18 @@ cifs_readv_callback(struct TCP_Server_Info *server, struct smb_message *smb)
__set_bit(NETFS_SREQ_MADE_PROGRESS, &rdata->subreq.flags);
}
+ trace_smb3_rw_credits(rreq_debug_id, subreq_debug_index, rdata->credits.value,
+ server->credits, server->in_flight,
+ 0, cifs_trace_rw_credits_read_response_clear);
rdata->credits.value = 0;
rdata->subreq.error = rdata->result;
rdata->subreq.transferred += smb->resp_data_len;
trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
netfs_read_subreq_terminated(&rdata->subreq);
add_credits(server, &credits, 0);
+ trace_smb3_rw_credits(rreq_debug_id, subreq_debug_index, 0,
+ server->credits, server->in_flight,
+ credits.value, cifs_trace_rw_credits_read_response_add);
}
/* cifs_async_readv - send an async write, and set up mid to handle result */
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-10-20 9:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-20 9:37 [PATCH] cifs: Add a couple of missing smb3_rw_credits tracepoints David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox