public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/11] sunrpc-enosys-when-unavail
@ 2004-04-26 10:28 Andreas Gruenbacher
  2004-04-26 20:33 ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Gruenbacher @ 2004-04-26 10:28 UTC (permalink / raw)
  To: Andrew Morton, lkml

Differentiate between program/procedure not available and other errors

  Andreas Gruenbacher <agruen@suse.de>, SUSE Labs

Index: linux-2.6.6-rc2/net/sunrpc/clnt.c
===================================================================
--- linux-2.6.6-rc2.orig/net/sunrpc/clnt.c
+++ linux-2.6.6-rc2/net/sunrpc/clnt.c
@@ -1018,23 +1018,28 @@ call_verify(struct rpc_task *task)
 	case RPC_SUCCESS:
 		return p;
 	case RPC_PROG_UNAVAIL:
-		printk(KERN_WARNING "RPC: call_verify: program %u is unsupported by server %s\n",
+		if (task->tk_client->cl_prog != 100227) {
+			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;
+		}
+		rpc_exit(task, -ENOSYS);
+		return NULL;
 	case RPC_PROG_MISMATCH:
 		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;
+		rpc_exit(task, -ENOSYS);
+		return NULL;
 	case RPC_PROC_UNAVAIL:
 		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);
-		goto out_eio;
+		rpc_exit(task, -ENOSYS);
+		return NULL;
 	case RPC_GARBAGE_ARGS:
 		break;			/* retry */
 	default:


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

* Re: [PATCH 1/11] sunrpc-enosys-when-unavail
  2004-04-26 10:28 [PATCH 1/11] sunrpc-enosys-when-unavail Andreas Gruenbacher
@ 2004-04-26 20:33 ` Trond Myklebust
  2004-04-27 13:38   ` Andreas Gruenbacher
  0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2004-04-26 20:33 UTC (permalink / raw)
  To: Andreas Gruenbacher; +Cc: Andrew Morton, lkml

On Mon, 2004-04-26 at 06:28, Andreas Gruenbacher wrote:
> Differentiate between program/procedure not available and other errors
> 

Sorry. This one is unacceptable. I will NOT have program numbers hard
coded into sunrpc. There should be no reason to do this at all...

Cheers,
  Trond

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

* Re: [PATCH 1/11] sunrpc-enosys-when-unavail
  2004-04-26 20:33 ` Trond Myklebust
@ 2004-04-27 13:38   ` Andreas Gruenbacher
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Gruenbacher @ 2004-04-27 13:38 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: lkml

Hello,

net/sunrpc/svc.c has a similar check already to prevent syslog flooding
for such common error conditions:

[] #ifdef RPC_PARANOIA
[]         if (prog != 100227 || progp->pg_prog != 100003)
[]                 printk("svc: unknown program %d (me %d)\n", prog, progp->pg_prog);
[]         /* else it is just a Solaris client seeing if ACLs are supported */
[] #endif

We could also get rid of the printk's in net/sunrpc/clnt.c -- your/Neil's call.

On Mon, 2004-04-26 at 22:33, Trond Myklebust wrote:
> On Mon, 2004-04-26 at 06:28, Andreas Gruenbacher wrote:
> > Differentiate between program/procedure not available and other errors
> > 
> 
> Sorry. This one is unacceptable. I will NOT have program numbers hard
> coded into sunrpc. There should be no reason to do this at all...
> 
> Cheers,
>   Trond
-- 
Andreas Gruenbacher <agruen@suse.de>
SUSE Labs, SUSE LINUX AG


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

end of thread, other threads:[~2004-04-27 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-26 10:28 [PATCH 1/11] sunrpc-enosys-when-unavail Andreas Gruenbacher
2004-04-26 20:33 ` Trond Myklebust
2004-04-27 13:38   ` Andreas Gruenbacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox