Skip to content

Commit 5da6fb6

Browse files
dhowellssmfrench
authored andcommitted
cifs: Add a couple of missing smb3_rw_credits tracepoints
Add missing smb3_rw_credits tracepoints to cifs_readv_callback() (for SMB1) to match those of SMB2/3. Signed-off-by: David Howells <[email protected]> cc: Steve French <[email protected]> cc: Paulo Alcantara <[email protected]> cc: Shyam Prasad N <[email protected]> cc: Tom Talpey <[email protected]> cc: [email protected] cc: [email protected] Signed-off-by: Steve French <[email protected]>
1 parent e607ef6 commit 5da6fb6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fs/smb/client/cifssmb.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,6 +1311,8 @@ cifs_readv_callback(struct mid_q_entry *mid)
13111311
.rreq_debug_id = rdata->rreq->debug_id,
13121312
.rreq_debug_index = rdata->subreq.debug_index,
13131313
};
1314+
unsigned int rreq_debug_id = rdata->rreq->debug_id;
1315+
unsigned int subreq_debug_index = rdata->subreq.debug_index;
13141316

13151317
cifs_dbg(FYI, "%s: mid=%llu state=%d result=%d bytes=%zu\n",
13161318
__func__, mid->mid, mid->mid_state, rdata->result,
@@ -1374,13 +1376,19 @@ cifs_readv_callback(struct mid_q_entry *mid)
13741376
__set_bit(NETFS_SREQ_MADE_PROGRESS, &rdata->subreq.flags);
13751377
}
13761378

1379+
trace_smb3_rw_credits(rreq_debug_id, subreq_debug_index, rdata->credits.value,
1380+
server->credits, server->in_flight,
1381+
0, cifs_trace_rw_credits_read_response_clear);
13771382
rdata->credits.value = 0;
13781383
rdata->subreq.error = rdata->result;
13791384
rdata->subreq.transferred += rdata->got_bytes;
13801385
trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
13811386
netfs_read_subreq_terminated(&rdata->subreq);
13821387
release_mid(mid);
13831388
add_credits(server, &credits, 0);
1389+
trace_smb3_rw_credits(rreq_debug_id, subreq_debug_index, 0,
1390+
server->credits, server->in_flight,
1391+
credits.value, cifs_trace_rw_credits_read_response_add);
13841392
}
13851393

13861394
/* cifs_async_readv - send an async write, and set up mid to handle result */

0 commit comments

Comments
 (0)