* [PATCH v1 1/1] smb: client: transport: Fix debug printing in __release_mid()
@ 2026-08-25 8:30 Andy Shevchenko
2026-08-25 23:34 ` Yunseong Kim
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-08-25 8:30 UTC (permalink / raw)
To: Steve French, David Howells, linux-cifs, samba-technical,
linux-kernel
Cc: Paulo Alcantara, Namjae Jeon, Ronnie Sahlberg, Shyam Prasad N,
Tom Talpey, Bharath SM, Andy Shevchenko
Long time ago during upgrading printk():s to the respective pr_<level>()
calls one misconversion happened and nobody has noticed that. So,
previously printk(KERN_DEBUG) + printk() worked as one long debug print
since the trailing '\n' is only present in the followup printk() format
string. The culprit change missed that and split the message to two on
the different levels. Restore the original behaviour to make users be
less confused in the most likely never happen cases of partially getting
that message.
Fixes: 0b456f04bcdf ("cifs: convert printk(LEVEL...) to pr_<level>")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
fs/smb/client/transport.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/smb/client/transport.c b/fs/smb/client/transport.c
index fdf4e50c27ce..e266859818a4 100644
--- a/fs/smb/client/transport.c
+++ b/fs/smb/client/transport.c
@@ -101,12 +101,11 @@ void __release_mid(struct TCP_Server_Info *server, struct mid_q_entry *midEntry)
trace_smb3_slow_rsp(smb_cmd, midEntry->mid, midEntry->pid,
midEntry->when_sent, midEntry->when_received);
if (cifsFYI & CIFS_TIMER) {
- pr_debug("slow rsp: cmd %d mid %llu",
- midEntry->command, midEntry->mid);
- cifs_info("A: 0x%lx S: 0x%lx R: 0x%lx\n",
- now - midEntry->when_alloc,
- now - midEntry->when_sent,
- now - midEntry->when_received);
+ pr_debug("slow rsp: cmd %d mid %llu A: 0x%lx S: 0x%lx R: 0x%lx\n",
+ midEntry->command, midEntry->mid,
+ now - midEntry->when_alloc,
+ now - midEntry->when_sent,
+ now - midEntry->when_received);
}
}
#endif
--
2.50.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] smb: client: transport: Fix debug printing in __release_mid()
2026-08-25 8:30 [PATCH v1 1/1] smb: client: transport: Fix debug printing in __release_mid() Andy Shevchenko
@ 2026-08-25 23:34 ` Yunseong Kim
2026-08-26 8:04 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Yunseong Kim @ 2026-08-25 23:34 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Yunseong Kim, Steve French, David Howells, linux-cifs,
samba-technical, linux-kernel, Paulo Alcantara, Namjae Jeon,
Ronnie Sahlberg, Shyam Prasad N, Tom Talpey, Bharath SM
Hi Andy,
On Tue, 25 Aug 2026 10:30:43 +0200 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> Long time ago during upgrading printk():s to the respective pr_<level>()
> calls one misconversion happened and nobody has noticed that. So,
> previously printk(KERN_DEBUG) + printk() worked as one long debug print
> since the trailing '\n' is only present in the followup printk() format
> string. The culprit change missed that and split the message to two on
> the different levels. Restore the original behaviour to make users be
> less confused in the most likely never happen cases of partially getting
> that message.
>
> Fixes: 0b456f04bcdf ("cifs: convert printk(LEVEL...) to pr_<level>")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> fs/smb/client/transport.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/fs/smb/client/transport.c b/fs/smb/client/transport.c
> index fdf4e50c27ce..e266859818a4 100644
> --- a/fs/smb/client/transport.c
> +++ b/fs/smb/client/transport.c
> @@ -101,12 +101,11 @@ void __release_mid(struct TCP_Server_Info *server, struct mid_q_entry *midEntry)
> trace_smb3_slow_rsp(smb_cmd, midEntry->mid, midEntry->pid,
> midEntry->when_sent, midEntry->when_received);
> if (cifsFYI & CIFS_TIMER) {
> - pr_debug("slow rsp: cmd %d mid %llu",
> - midEntry->command, midEntry->mid);
> - cifs_info("A: 0x%lx S: 0x%lx R: 0x%lx\n",
> - now - midEntry->when_alloc,
> - now - midEntry->when_sent,
> - now - midEntry->when_received);
> + pr_debug("slow rsp: cmd %d mid %llu A: 0x%lx S: 0x%lx R: 0x%lx\n",
> + midEntry->command, midEntry->mid,
The change looks correct to me.
One minor suggestion: could the format string be split using adjacent
string literals to avoid the long source line?
pr_debug("slow rsp: cmd %d mid %llu "
"A: 0x%lx S: 0x%lx R: 0x%lx\n",
...);
> + now - midEntry->when_alloc,
> + now - midEntry->when_sent,
> + now - midEntry->when_received);
> }
> }
> #endif
> --
> 2.50.1
>
>
Thank you!
Best regards,
Yunseong
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] smb: client: transport: Fix debug printing in __release_mid()
2026-08-25 23:34 ` Yunseong Kim
@ 2026-08-26 8:04 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2026-08-26 8:04 UTC (permalink / raw)
To: Yunseong Kim
Cc: Steve French, David Howells, linux-cifs, samba-technical,
linux-kernel, Paulo Alcantara, Namjae Jeon, Ronnie Sahlberg,
Shyam Prasad N, Tom Talpey, Bharath SM
On Wed, Aug 26, 2026 at 01:34:06AM +0200, Yunseong Kim wrote:
> On Tue, 25 Aug 2026 10:30:43 +0200 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
...
> > - cifs_info("A: 0x%lx S: 0x%lx R: 0x%lx\n",
> > - now - midEntry->when_alloc,
> > - now - midEntry->when_sent,
> > - now - midEntry->when_received);
> > + pr_debug("slow rsp: cmd %d mid %llu A: 0x%lx S: 0x%lx R: 0x%lx\n",
> > + midEntry->command, midEntry->mid,
>
> The change looks correct to me.
>
> One minor suggestion: could the format string be split using adjacent
> string literals to avoid the long source line?
>
> pr_debug("slow rsp: cmd %d mid %llu "
> "A: 0x%lx S: 0x%lx R: 0x%lx\n",
> ...);
No, the idea is to have long string literals. This was exceptionally done
somewhat 15+ years ago.
See f4c014c0dede ("checkpatch: allow printk strings to exceed 80 characters to
maintain their searchability") as the result of the discussion started here:
https://lore.kernel.org/lkml/20080222132612.GA11717@basil.nowhere.org/
> > + now - midEntry->when_alloc,
> > + now - midEntry->when_sent,
> > + now - midEntry->when_received);
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-26 8:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25 8:30 [PATCH v1 1/1] smb: client: transport: Fix debug printing in __release_mid() Andy Shevchenko
2026-08-25 23:34 ` Yunseong Kim
2026-08-26 8:04 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox