diff mbox series

[1/2] cifs: reduce warning log level for server not advertising interfaces

Message ID 20240313104041.188204-1-sprasad@microsoft.com (mailing list archive)
State New, archived
Headers show
Series [1/2] cifs: reduce warning log level for server not advertising interfaces | expand

Commit Message

Shyam Prasad N March 13, 2024, 10:40 a.m. UTC
From: Shyam Prasad N <sprasad@microsoft.com>

Several users have reported this log getting dumped too regularly to
kernel log. The likely root cause has been identified, and it suggests
that this situation is expected for some configurations
(for example SMB2.1).

Since the function returns appropriately even for such cases, it is
fairly harmless to make this a debug log. When needed, the verbosity
can be increased to capture this log.

Cc: Stable <stable@vger.kernel.org>
Reported-by: Jan Čermák <sairon@sairon.cz>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
---
 fs/smb/client/sess.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Steve French March 13, 2024, 4:45 p.m. UTC | #1
what about simply a "warn_once" since it is useful for the user to
know that their server does not advertise interfaces so can affect
performance (multichannel) and perhaps some reconnect scenarios.

On Wed, Mar 13, 2024 at 5:40 AM <nspmangalore@gmail.com> wrote:
>
> From: Shyam Prasad N <sprasad@microsoft.com>
>
> Several users have reported this log getting dumped too regularly to
> kernel log. The likely root cause has been identified, and it suggests
> that this situation is expected for some configurations
> (for example SMB2.1).
>
> Since the function returns appropriately even for such cases, it is
> fairly harmless to make this a debug log. When needed, the verbosity
> can be increased to capture this log.
>
> Cc: Stable <stable@vger.kernel.org>
> Reported-by: Jan Čermák <sairon@sairon.cz>
> Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
> ---
>  fs/smb/client/sess.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c
> index 8f37373fd333..37cdf5b55108 100644
> --- a/fs/smb/client/sess.c
> +++ b/fs/smb/client/sess.c
> @@ -230,7 +230,7 @@ int cifs_try_adding_channels(struct cifs_ses *ses)
>                 spin_lock(&ses->iface_lock);
>                 if (!ses->iface_count) {
>                         spin_unlock(&ses->iface_lock);
> -                       cifs_dbg(VFS, "server %s does not advertise interfaces\n",
> +                       cifs_dbg(FYI, "server %s does not advertise interfaces\n",
>                                       ses->server->hostname);
>                         break;
>                 }
> @@ -396,7 +396,7 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
>         spin_lock(&ses->iface_lock);
>         if (!ses->iface_count) {
>                 spin_unlock(&ses->iface_lock);
> -               cifs_dbg(VFS, "server %s does not advertise interfaces\n", ses->server->hostname);
> +               cifs_dbg(FYI, "server %s does not advertise interfaces\n", ses->server->hostname);
>                 return;
>         }
>
> --
> 2.34.1
>
Steve French March 14, 2024, 5:16 p.m. UTC | #2
updated patch to change to warn once, and to fix a minor checkpatch
warning (about format of stable tag)


On Wed, Mar 13, 2024 at 11:45 AM Steve French <smfrench@gmail.com> wrote:
>
> what about simply a "warn_once" since it is useful for the user to
> know that their server does not advertise interfaces so can affect
> performance (multichannel) and perhaps some reconnect scenarios.
>
> On Wed, Mar 13, 2024 at 5:40 AM <nspmangalore@gmail.com> wrote:
> >
> > From: Shyam Prasad N <sprasad@microsoft.com>
> >
> > Several users have reported this log getting dumped too regularly to
> > kernel log. The likely root cause has been identified, and it suggests
> > that this situation is expected for some configurations
> > (for example SMB2.1).
> >
> > Since the function returns appropriately even for such cases, it is
> > fairly harmless to make this a debug log. When needed, the verbosity
> > can be increased to capture this log.
> >
> > Cc: Stable <stable@vger.kernel.org>
> > Reported-by: Jan Čermák <sairon@sairon.cz>
> > Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
> > ---
> >  fs/smb/client/sess.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c
> > index 8f37373fd333..37cdf5b55108 100644
> > --- a/fs/smb/client/sess.c
> > +++ b/fs/smb/client/sess.c
> > @@ -230,7 +230,7 @@ int cifs_try_adding_channels(struct cifs_ses *ses)
> >                 spin_lock(&ses->iface_lock);
> >                 if (!ses->iface_count) {
> >                         spin_unlock(&ses->iface_lock);
> > -                       cifs_dbg(VFS, "server %s does not advertise interfaces\n",
> > +                       cifs_dbg(FYI, "server %s does not advertise interfaces\n",
> >                                       ses->server->hostname);
> >                         break;
> >                 }
> > @@ -396,7 +396,7 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
> >         spin_lock(&ses->iface_lock);
> >         if (!ses->iface_count) {
> >                 spin_unlock(&ses->iface_lock);
> > -               cifs_dbg(VFS, "server %s does not advertise interfaces\n", ses->server->hostname);
> > +               cifs_dbg(FYI, "server %s does not advertise interfaces\n", ses->server->hostname);
> >                 return;
> >         }
> >
> > --
> > 2.34.1
> >
>
>
> --
> Thanks,
>
> Steve
diff mbox series

Patch

diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c
index 8f37373fd333..37cdf5b55108 100644
--- a/fs/smb/client/sess.c
+++ b/fs/smb/client/sess.c
@@ -230,7 +230,7 @@  int cifs_try_adding_channels(struct cifs_ses *ses)
 		spin_lock(&ses->iface_lock);
 		if (!ses->iface_count) {
 			spin_unlock(&ses->iface_lock);
-			cifs_dbg(VFS, "server %s does not advertise interfaces\n",
+			cifs_dbg(FYI, "server %s does not advertise interfaces\n",
 				      ses->server->hostname);
 			break;
 		}
@@ -396,7 +396,7 @@  cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
 	spin_lock(&ses->iface_lock);
 	if (!ses->iface_count) {
 		spin_unlock(&ses->iface_lock);
-		cifs_dbg(VFS, "server %s does not advertise interfaces\n", ses->server->hostname);
+		cifs_dbg(FYI, "server %s does not advertise interfaces\n", ses->server->hostname);
 		return;
 	}