All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/sunrpc/clnt.c compile fix
@ 2003-10-09 16:13 Paul Mundt
  2003-10-09 16:33 ` Geert Uytterhoeven
  2003-10-09 16:37 ` Trond Myklebust
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Mundt @ 2003-10-09 16:13 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

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

Not sure if anyone has submitted this already, but as the subject implies,
net/sunrpc/clnt.c does not compile in either stock test7 or in current BK:

  CC      net/sunrpc/clnt.o
  net/sunrpc/clnt.c: In function `call_verify':
  net/sunrpc/clnt.c:965: structure has no member named `tk_pid'
  net/sunrpc/clnt.c:970: structure has no member named `tk_pid'
  net/sunrpc/clnt.c:976: structure has no member named `tk_pid'
  make[1]: *** [net/sunrpc/clnt.o] Error 1
  make: *** [net/sunrpc/clnt.o] Error 2

This is due to the fact that tk_pid is protected by RPC_DEBUG. Wrapping
through dprintk() fixes this.

--- linux-sh-2.6.0-test7.orig/net/sunrpc/clnt.c	Thu Oct  9 09:42:45 2003
+++ linux-sh-2.6.0-test7/net/sunrpc/clnt.c	Thu Oct  9 12:04:56 2003
@@ -961,18 +961,18 @@
 	case RPC_SUCCESS:
 		return p;
 	case RPC_PROG_UNAVAIL:
-		printk(KERN_WARNING "RPC: %4d call_verify: program %u is unsupported by server %s\n",
+		dprintk("RPC: %4d call_verify: program %u is unsupported by server %s\n",
 				task->tk_pid, (unsigned int)task->tk_client->cl_prog,
 				task->tk_client->cl_server);
 		goto out_eio;
 	case RPC_PROG_MISMATCH:
-		printk(KERN_WARNING "RPC: %4d call_verify: program %u, version %u unsupported by server %s\n",
+		dprintk("RPC: %4d call_verify: program %u, version %u unsupported by server %s\n",
 				task->tk_pid, (unsigned int)task->tk_client->cl_prog,
 				(unsigned int)task->tk_client->cl_vers,
 				task->tk_client->cl_server);
 		goto out_eio;
 	case RPC_PROC_UNAVAIL:
-		printk(KERN_WARNING "RPC: %4d call_verify: proc %p unsupported by program %u, version %u on server %s\n",
+		dprintk("RPC: %4d call_verify: proc %p unsupported by program %u, version %u on server %s\n",
 				task->tk_pid, task->tk_msg.rpc_proc,
 				task->tk_client->cl_prog,
 				task->tk_client->cl_vers,

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/sunrpc/clnt.c compile fix
  2003-10-09 16:13 [PATCH] net/sunrpc/clnt.c compile fix Paul Mundt
@ 2003-10-09 16:33 ` Geert Uytterhoeven
  2003-10-09 16:37 ` Trond Myklebust
  1 sibling, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2003-10-09 16:33 UTC (permalink / raw)
  To: Paul Mundt; +Cc: Linus Torvalds, Linux Kernel Development

On Thu, 9 Oct 2003, Paul Mundt wrote:
> Not sure if anyone has submitted this already, but as the subject implies,
> net/sunrpc/clnt.c does not compile in either stock test7 or in current BK:
> 
>   CC      net/sunrpc/clnt.o
>   net/sunrpc/clnt.c: In function `call_verify':
>   net/sunrpc/clnt.c:965: structure has no member named `tk_pid'
>   net/sunrpc/clnt.c:970: structure has no member named `tk_pid'
>   net/sunrpc/clnt.c:976: structure has no member named `tk_pid'
>   make[1]: *** [net/sunrpc/clnt.o] Error 1
>   make: *** [net/sunrpc/clnt.o] Error 2
> 
> This is due to the fact that tk_pid is protected by RPC_DEBUG. Wrapping
> through dprintk() fixes this.

Since it compiled in my m68k-build-all-that-builds kernel, I decided to jump
into this.

Apparently RPC_DEBUG is set if CONFIG_SYSCTL is defined
(<linux/sunrpc/debug.h>), so it builds or not depending on CONFIG_SYSCTL.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/sunrpc/clnt.c compile fix
  2003-10-09 16:13 [PATCH] net/sunrpc/clnt.c compile fix Paul Mundt
  2003-10-09 16:33 ` Geert Uytterhoeven
@ 2003-10-09 16:37 ` Trond Myklebust
  2003-10-09 16:40   ` Paul Mundt
  1 sibling, 1 reply; 7+ messages in thread
From: Trond Myklebust @ 2003-10-09 16:37 UTC (permalink / raw)
  To: Paul Mundt; +Cc: torvalds, linux-kernel

>>>>> " " == Paul Mundt <lethal@linux-sh.org> writes:

     > Not sure if anyone has submitted this already, but as the
     > subject implies, net/sunrpc/clnt.c does not compile in either
     > stock test7 or in current BK:

Only if you do not also set CONFIG_SYSCTL.

     >   CC net/sunrpc/clnt.o net/sunrpc/clnt.c: In function
     >   `call_verify': net/sunrpc/clnt.c:965: structure has no member
     >   named `tk_pid' net/sunrpc/clnt.c:970: structure has no member
     >   named `tk_pid' net/sunrpc/clnt.c:976: structure has no member
     >   named `tk_pid' make[1]: *** [net/sunrpc/clnt.o] Error 1 make:
     >   *** [net/sunrpc/clnt.o] Error 2

     > This is due to the fact that tk_pid is protected by
     > RPC_DEBUG. Wrapping through dprintk() fixes this.

No... You are suppressing legitimate warning messages that inform the
user of a client/server mismatch!

Better then to remove the tk_pid from the warning messages...

Cheers
  Trond

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/sunrpc/clnt.c compile fix
  2003-10-09 16:37 ` Trond Myklebust
@ 2003-10-09 16:40   ` Paul Mundt
  2003-10-09 16:50     ` Trond Myklebust
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Mundt @ 2003-10-09 16:40 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: torvalds, linux-kernel

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

On Thu, Oct 09, 2003 at 12:37:49PM -0400, Trond Myklebust wrote:
>      > This is due to the fact that tk_pid is protected by
>      > RPC_DEBUG. Wrapping through dprintk() fixes this.
> 
> No... You are suppressing legitimate warning messages that inform the
> user of a client/server mismatch!
> 
> Better then to remove the tk_pid from the warning messages...
> 
Is there any reason why tk_pid needs to be under RPC_DEBUG in the first place?
If these are legitimate warning messages, presumably it would be nice to know
the offending pid as well.


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/sunrpc/clnt.c compile fix
  2003-10-09 16:40   ` Paul Mundt
@ 2003-10-09 16:50     ` Trond Myklebust
  2003-10-09 16:54       ` Paul Mundt
  0 siblings, 1 reply; 7+ messages in thread
From: Trond Myklebust @ 2003-10-09 16:50 UTC (permalink / raw)
  To: Paul Mundt; +Cc: torvalds, linux-kernel

>>>>> " " == Paul Mundt <lethal@linux-sh.org> writes:

     > Is there any reason why tk_pid needs to be under RPC_DEBUG in
     > the first place?  If these are legitimate warning messages,
     > presumably it would be nice to know the offending pid as well.

It's not a true process pid, but more of a tag on each struct
rpc_task. It turns out to be more helpful when you are tracing the
(d|)printk() debugging info, since a process may have several rpc_task
in flight at any point in time.

Cheers,
  Trond

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/sunrpc/clnt.c compile fix
  2003-10-09 16:50     ` Trond Myklebust
@ 2003-10-09 16:54       ` Paul Mundt
  2003-10-09 16:57         ` Trond Myklebust
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Mundt @ 2003-10-09 16:54 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: torvalds, linux-kernel

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

On Thu, Oct 09, 2003 at 12:50:31PM -0400, Trond Myklebust wrote:
> It's not a true process pid, but more of a tag on each struct
> rpc_task. It turns out to be more helpful when you are tracing the
> (d|)printk() debugging info, since a process may have several rpc_task
> in flight at any point in time.
> 
Sounds reasonable. Does this look ok?

--- linux-sh-2.6.0-test7.orig/net/sunrpc/clnt.c	Thu Oct  9 09:42:45 2003
+++ linux-sh-2.6.0-test7/net/sunrpc/clnt.c	Thu Oct  9 12:53:05 2003
@@ -961,19 +961,19 @@
 	case RPC_SUCCESS:
 		return p;
 	case RPC_PROG_UNAVAIL:
-		printk(KERN_WARNING "RPC: %4d call_verify: program %u is unsupported by server %s\n",
-				task->tk_pid, (unsigned int)task->tk_client->cl_prog,
+		printk(KERN_WARNING "RPC: call_verify: program %u is unsupported by server %s\n",
+				(unsigned int)task->tk_client->cl_prog,
 				task->tk_client->cl_server);
 		goto out_eio;
 	case RPC_PROG_MISMATCH:
-		printk(KERN_WARNING "RPC: %4d call_verify: program %u, version %u unsupported by server %s\n",
-				task->tk_pid, (unsigned int)task->tk_client->cl_prog,
+		printk(KERN_WARNING "RPC: call_verify: program %u, version %u unsupported by server %s\n",
+				(unsigned int)task->tk_client->cl_prog,
 				(unsigned int)task->tk_client->cl_vers,
 				task->tk_client->cl_server);
 		goto out_eio;
 	case RPC_PROC_UNAVAIL:
-		printk(KERN_WARNING "RPC: %4d call_verify: proc %p unsupported by program %u, version %u on server %s\n",
-				task->tk_pid, task->tk_msg.rpc_proc,
+		printk(KERN_WARNING "RPC: call_verify: proc %p unsupported by program %u, version %u on server %s\n",
+				task->tk_msg.rpc_proc,
 				task->tk_client->cl_prog,
 				task->tk_client->cl_vers,
 				task->tk_client->cl_server);

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/sunrpc/clnt.c compile fix
  2003-10-09 16:54       ` Paul Mundt
@ 2003-10-09 16:57         ` Trond Myklebust
  0 siblings, 0 replies; 7+ messages in thread
From: Trond Myklebust @ 2003-10-09 16:57 UTC (permalink / raw)
  To: Paul Mundt; +Cc: torvalds, linux-kernel


     > On Thu, Oct 09, 2003 at 12:50:31PM -0400, Trond Myklebust
     > wrote:
    >> It's not a true process pid, but more of a tag on each struct
    >> rpc_task. It turns out to be more helpful when you are tracing
    >> the (d|)printk() debugging info, since a process may have
    >> several rpc_task in flight at any point in time.
    >>
     > Sounds reasonable. Does this look ok?

Looks fine to me...

Cheers,
  Trond

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-10-09 16:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-09 16:13 [PATCH] net/sunrpc/clnt.c compile fix Paul Mundt
2003-10-09 16:33 ` Geert Uytterhoeven
2003-10-09 16:37 ` Trond Myklebust
2003-10-09 16:40   ` Paul Mundt
2003-10-09 16:50     ` Trond Myklebust
2003-10-09 16:54       ` Paul Mundt
2003-10-09 16:57         ` Trond Myklebust

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.