Skip to content

Commit ab85218

Browse files
dhowellssmfrench
authored andcommitted
netfs, cifs: Improve some debugging bits
Improve some debugging bits: (1) The netfslib _debug() macro doesn't need a newline in its format string. (2) Display the request debug ID and subrequest index in messages emitted in smb2_adjust_credits() to make it easier to reference in traces. Signed-off-by: David Howells <[email protected]> cc: Steve French <[email protected]> cc: Paulo Alcantara <[email protected]> cc: Jeff Layton <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] Signed-off-by: Steve French <[email protected]>
1 parent a68c748 commit ab85218

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

fs/netfs/io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static void netfs_reset_subreq_iter(struct netfs_io_request *rreq,
270270
if (count == remaining)
271271
return;
272272

273-
_debug("R=%08x[%u] ITER RESUB-MISMATCH %zx != %zx-%zx-%llx %x\n",
273+
_debug("R=%08x[%u] ITER RESUB-MISMATCH %zx != %zx-%zx-%llx %x",
274274
rreq->debug_id, subreq->debug_index,
275275
iov_iter_count(&subreq->io_iter), subreq->transferred,
276276
subreq->len, rreq->i_size,

fs/smb/client/smb2ops.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ smb2_adjust_credits(struct TCP_Server_Info *server,
316316
cifs_trace_rw_credits_no_adjust_up);
317317
trace_smb3_too_many_credits(server->CurrentMid,
318318
server->conn_id, server->hostname, 0, credits->value - new_val, 0);
319-
cifs_server_dbg(VFS, "request has less credits (%d) than required (%d)",
319+
cifs_server_dbg(VFS, "R=%x[%x] request has less credits (%d) than required (%d)",
320+
subreq->rreq->debug_id, subreq->subreq.debug_index,
320321
credits->value, new_val);
321322

322323
return -EOPNOTSUPP;
@@ -338,8 +339,9 @@ smb2_adjust_credits(struct TCP_Server_Info *server,
338339
trace_smb3_reconnect_detected(server->CurrentMid,
339340
server->conn_id, server->hostname, scredits,
340341
credits->value - new_val, in_flight);
341-
cifs_server_dbg(VFS, "trying to return %d credits to old session\n",
342-
credits->value - new_val);
342+
cifs_server_dbg(VFS, "R=%x[%x] trying to return %d credits to old session\n",
343+
subreq->rreq->debug_id, subreq->subreq.debug_index,
344+
credits->value - new_val);
343345
return -EAGAIN;
344346
}
345347

0 commit comments

Comments
 (0)