All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: nspmangalore@gmail.com
Cc: linux-cifs@vger.kernel.org, pc@manguebit.com,
	bharathsm@microsoft.com, "Shyam Prasad N" <sprasad@microsoft.com>,
	Stable <stable@vger.kernel.org>, "Jan Čermák" <sairon@sairon.cz>
Subject: Re: [PATCH 1/2] cifs: reduce warning log level for server not advertising interfaces
Date: Thu, 14 Mar 2024 12:16:45 -0500	[thread overview]
Message-ID: <CAH2r5mu-8eyykEN4yaQ1C-yzg0_hdHDE=x2rxjuxh1sZFHirAA@mail.gmail.com> (raw)
In-Reply-To: <CAH2r5mtDe_E9=mGx1mOjfEMfgdhV9W=TjijXOdqgTkasVE81=g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2508 bytes --]

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



-- 
Thanks,

Steve

[-- Attachment #2: 0002-cifs-reduce-warning-log-level-for-server-not-adverti.patch --]
[-- Type: text/x-patch, Size: 1881 bytes --]

From 21dd8df65a7f87ecc928ad325ab163ab08a556be Mon Sep 17 00:00:00 2001
From: Shyam Prasad N <sprasad@microsoft.com>
Date: Wed, 13 Mar 2024 10:40:40 +0000
Subject: [PATCH 2/4] cifs: reduce warning log level for server not advertising
 interfaces
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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@vger.kernel.org
Reported-by: Jan Čermák <sairon@sairon.cz>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@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..3216f786908f 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(ONCE, "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(ONCE, "server %s does not advertise interfaces\n", ses->server->hostname);
 		return;
 	}
 
-- 
2.40.1


      reply	other threads:[~2024-03-14 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 10:40 [PATCH 1/2] cifs: reduce warning log level for server not advertising interfaces nspmangalore
2024-03-13 10:40 ` [PATCH 2/2] cifs: make sure server interfaces are requested only for SMB3+ nspmangalore
2024-03-14  3:14   ` Steve French
2024-03-13 16:45 ` [PATCH 1/2] cifs: reduce warning log level for server not advertising interfaces Steve French
2024-03-14 17:16   ` Steve French [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH2r5mu-8eyykEN4yaQ1C-yzg0_hdHDE=x2rxjuxh1sZFHirAA@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=bharathsm@microsoft.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=nspmangalore@gmail.com \
    --cc=pc@manguebit.com \
    --cc=sairon@sairon.cz \
    --cc=sprasad@microsoft.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.