Commit 5da6fb63 authored by David Howells's avatar David Howells Committed by Steve French
Browse files

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: default avatarDavid 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
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent e607ef68
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1311,6 +1311,8 @@ cifs_readv_callback(struct mid_q_entry *mid)
		.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__, mid->mid, mid->mid_state, rdata->result,
@@ -1374,6 +1376,9 @@ cifs_readv_callback(struct mid_q_entry *mid)
			__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 += rdata->got_bytes;
@@ -1381,6 +1386,9 @@ cifs_readv_callback(struct mid_q_entry *mid)
	netfs_read_subreq_terminated(&rdata->subreq);
	release_mid(mid);
	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 */