Skip to content

Commit

Permalink
smb3: Add debug message later in smb2/smb3 reconnect path
Browse files Browse the repository at this point in the history
As we reset credits later in the reconnect path, useful
to have optional (cifsFYI) debug message.

Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
  • Loading branch information
Steve French committed Oct 24, 2018
1 parent 8393072 commit 6e4d3bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
server->maxBuf = 0;
server->max_read = 0;

cifs_dbg(FYI, "Reconnecting tcp session\n");
cifs_dbg(FYI, "Mark tcp session as need reconnect\n");
trace_smb3_reconnect(server->CurrentMid, server->hostname);

/* before reconnecting the tcp session, mark the smb session (uid)
Expand Down
3 changes: 3 additions & 0 deletions fs/cifs/smb2ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ smb2_set_credits(struct TCP_Server_Info *server, const int val)
if (val == 1)
server->reconnect_instance++;
spin_unlock(&server->req_lock);
/* don't log while holding the lock */
if (val == 1)
cifs_dbg(FYI, "set credits to 1 due to smb2 reconnect\n");
}

static int *
Expand Down

0 comments on commit 6e4d3bb

Please sign in to comment.