diff mbox series

[4/9] smb: client: stop flooding dmesg in smb2_calc_signature()

Message ID 20240918051542.64349-4-pc@manguebit.com (mailing list archive)
State New, archived
Headers show
Series [1/9] smb: client: avoid unnecessary reconnects when refreshing referrals | expand

Commit Message

Paulo Alcantara Sept. 18, 2024, 5:15 a.m. UTC
When having several mounts that share same credential and the client
couldn't re-establish an SMB session due to an expired kerberos ticket
or rotated password, smb2_calc_signature() will end up flooding dmesg
when not finding SMB sessions to calculate signatures.

Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
---
 fs/smb/client/smb2transport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steve French Sept. 25, 2024, 2:23 a.m. UTC | #1
any thoughts on whether this should be at least a log once event? How
to make it log at least once, but also something that could be turned
on (doesn't seem like it makes sense to make it an dynamic trace point
though ... right?)

On Wed, Sep 18, 2024 at 12:16 AM Paulo Alcantara <pc@manguebit.com> wrote:
>
> When having several mounts that share same credential and the client
> couldn't re-establish an SMB session due to an expired kerberos ticket
> or rotated password, smb2_calc_signature() will end up flooding dmesg
> when not finding SMB sessions to calculate signatures.
>
> Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
> ---
>  fs/smb/client/smb2transport.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/smb/client/smb2transport.c b/fs/smb/client/smb2transport.c
> index e4636fca821d..c8bf0000f73b 100644
> --- a/fs/smb/client/smb2transport.c
> +++ b/fs/smb/client/smb2transport.c
> @@ -242,7 +242,7 @@ smb2_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server,
>
>         ses = smb2_find_smb_ses(server, le64_to_cpu(shdr->SessionId));
>         if (unlikely(!ses)) {
> -               cifs_server_dbg(VFS, "%s: Could not find session\n", __func__);
> +               cifs_server_dbg(FYI, "%s: Could not find session\n", __func__);
>                 return -ENOENT;
>         }
>
> --
> 2.46.0
>
Paulo Alcantara Sept. 25, 2024, 2:30 p.m. UTC | #2
Steve French <smfrench@gmail.com> writes:

> any thoughts on whether this should be at least a log once event? How
> to make it log at least once, but also something that could be turned
> on (doesn't seem like it makes sense to make it an dynamic trace point
> though ... right?)

Yep, having it logged once with "VFS | ONCE" would be fine.  Feel free
to change it.

A dynamic trace point would be great, too.  This could be done in a
separate patch.
diff mbox series

Patch

diff --git a/fs/smb/client/smb2transport.c b/fs/smb/client/smb2transport.c
index e4636fca821d..c8bf0000f73b 100644
--- a/fs/smb/client/smb2transport.c
+++ b/fs/smb/client/smb2transport.c
@@ -242,7 +242,7 @@  smb2_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server,
 
 	ses = smb2_find_smb_ses(server, le64_to_cpu(shdr->SessionId));
 	if (unlikely(!ses)) {
-		cifs_server_dbg(VFS, "%s: Could not find session\n", __func__);
+		cifs_server_dbg(FYI, "%s: Could not find session\n", __func__);
 		return -ENOENT;
 	}