From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: linux-kernel@vger.kernel.org, Neil Brown <neilb@cse.unsw.edu.au>,
Olaf Kirch <okir@suse.de>,
"Andries E. Brouwer" <Andries.Brouwer@cwi.nl>,
Buck Huppmann <buchk@pobox.com>, Andrew Morton <akpm@osdl.org>
Subject: Re: [patch 2/13] Return -ENOSYS for RPC programs that are unavailable
Date: Tue, 15 Feb 2005 12:04:29 -0500 [thread overview]
Message-ID: <1108487069.10073.32.camel@lade.trondhjem.org> (raw)
In-Reply-To: <20050122203619.063713000@blunzn.suse.de>
No hacks in sunrpc, please: i.e. get rid of that NFSACL_PROGRAM
exception...
If you want to kill those warnings, please just convert them to
dprintks().
Also, why are you converting "unknown error" into ENOSYS?
Finally, it might make sense to distinguish between "program" and
"procedure" errors. How about converting that RPC_PROC_UNAVAIL error
into EOPNOTSUPP (like we already do in the NFS layer itself).
Cheers,
Trond
lau den 22.01.2005 Klokka 21:34 (+0100) skreiv Andreas Gruenbacher:
> vanlig tekstdokument vedlegg (patches.suse)
> The issuer of an RPC call should be able to tell the difference
> between an I/O error and program unavailable / program version
> unavailable / procedure unavailable. Return -ENOSYS for unavailable
> RPCs instead of -EIO.
>
> Only issue a program unavailable warning for program numbers other
> than the one for nfsacl: Clients with nfsacl support are quite
> common already; no need to clutter the syslog.
>
> Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
> Signed-off-by: Olaf Kirch <okir@suse.de>
>
> Index: linux-2.6.11-rc2/include/linux/nfs.h
> ===================================================================
> --- linux-2.6.11-rc2.orig/include/linux/nfs.h
> +++ linux-2.6.11-rc2/include/linux/nfs.h
> @@ -11,6 +11,7 @@
> #include <linux/string.h>
>
> #define NFS_PROGRAM 100003
> +#define NFSACL_PROGRAM 100227
> #define NFS_PORT 2049
> #define NFS_MAXDATA 8192
> #define NFS_MAXPATHLEN 1024
> Index: linux-2.6.11-rc2/net/sunrpc/clnt.c
> ===================================================================
> --- linux-2.6.11-rc2.orig/net/sunrpc/clnt.c
> +++ linux-2.6.11-rc2/net/sunrpc/clnt.c
> @@ -988,10 +988,12 @@ call_verify(struct rpc_task *task)
> break;
> case RPC_MISMATCH:
> printk(KERN_WARNING "%s: RPC call version mismatch!\n", __FUNCTION__);
> - goto out_eio;
> + error = -ENOSYS;
> + goto out_err;
> default:
> printk(KERN_WARNING "%s: RPC call rejected, unknown error: %x\n", __FUNCTION__, n);
> - goto out_eio;
> + error = -ENOSYS;
> + goto out_err;
> }
> if (--len < 0)
> goto out_overflow;
> @@ -1041,23 +1043,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 != NFSACL_PROGRAM) {
> + 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;
> + }
> + error = -ENOSYS;
> + goto out_err;
> 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;
> + error = -ENOSYS;
> + goto out_err;
> 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;
> + error = -ENOSYS;
> + goto out_err;
> case RPC_GARBAGE_ARGS:
> dprintk("RPC: %4d %s: server saw garbage\n", task->tk_pid, __FUNCTION__);
> break; /* retry */
> @@ -1075,7 +1082,6 @@ out_retry:
> return NULL;
> }
> printk(KERN_WARNING "RPC %s: retry failed, exit EIO\n", __FUNCTION__);
> -out_eio:
> error = -EIO;
> out_err:
> rpc_exit(task, error);
>
> --
> Andreas Gruenbacher <agruen@suse.de>
> SUSE Labs, SUSE LINUX PRODUCTS GMBH
>
--
Trond Myklebust <trond.myklebust@fys.uio.no>
next prev parent reply other threads:[~2005-02-15 17:10 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-22 20:34 [patch 0/13] NFSACL protocol extension for NFSv3 Andreas Gruenbacher
2005-01-22 20:34 ` [patch 1/13] Qsort Andreas Gruenbacher
2005-01-22 21:00 ` vlobanov
2005-01-23 2:03 ` Felipe Alfaro Solana
2005-01-23 2:39 ` Andi Kleen
2005-01-23 3:02 ` Jesper Juhl
2005-01-23 4:46 ` Andi Kleen
2005-01-23 5:05 ` Jesper Juhl
2005-01-23 10:37 ` Rafael J. Wysocki
2005-01-24 4:29 ` Horst von Brand
2005-01-24 15:45 ` Alan Cox
2005-01-24 17:10 ` H. Peter Anvin
2005-01-25 0:43 ` Horst von Brand
2005-01-25 4:06 ` Eric St-Laurent
2005-01-24 22:04 ` Mike Waychison
2005-01-25 6:51 ` Andi Kleen
2005-01-25 10:12 ` Andreas Gruenbacher
2005-01-25 12:00 ` Andi Kleen
2005-01-25 12:05 ` Olaf Kirch
2005-01-25 16:52 ` Trond Myklebust
2005-01-25 16:53 ` Andreas Gruenbacher
2005-01-25 17:03 ` Trond Myklebust
2005-01-25 17:16 ` Andreas Gruenbacher
2005-01-25 17:37 ` Trond Myklebust
2005-01-25 18:12 ` Andreas Gruenbacher
2005-01-25 19:33 ` Trond Myklebust
2005-01-25 19:49 ` Andreas Gruenbacher
2005-01-23 4:29 ` Matt Mackall
2005-01-24 0:21 ` Nathan Scott
2005-01-24 2:57 ` Matt Mackall
2005-01-24 4:02 ` Horst von Brand
2005-01-24 21:57 ` Matt Mackall
2005-01-23 4:58 ` Felipe Alfaro Solana
2005-01-24 21:20 ` Matt Mackall
2005-01-24 21:50 ` vlobanov
2005-01-23 4:22 ` Matt Mackall
2005-01-23 5:44 ` Willy Tarreau
2005-01-23 21:24 ` Richard Henderson
[not found] ` <1106431568.4153.154.camel@laptopd505.fenrus.org>
2005-01-22 22:10 ` Andreas Gruenbacher
2005-01-22 23:28 ` Matt Mackall
2005-01-23 0:21 ` Matt Mackall
2005-01-23 5:08 ` Andreas Gruenbacher
2005-01-23 5:32 ` Matt Mackall
2005-01-23 12:22 ` Andreas Gruenbacher
2005-01-23 16:49 ` Matt Mackall
2005-01-24 3:48 ` Horst von Brand
2005-01-24 20:15 ` [PATCH] lib/qsort Matt Mackall
2005-01-24 23:09 ` Andrew Morton
2005-01-24 23:30 ` Matt Mackall
2005-01-25 4:11 ` Matt Mackall
2005-01-22 20:34 ` [patch 2/13] Return -ENOSYS for RPC programs that are unavailable Andreas Gruenbacher
2005-02-15 17:04 ` Trond Myklebust [this message]
2005-02-16 15:32 ` Andreas Gruenbacher
2005-01-22 20:34 ` [patch 3/13] Add missing -EOPNOTSUPP => NFS3ERR_NOTSUPP mapping in nfsd Andreas Gruenbacher
2005-01-22 20:34 ` [patch 4/13] Allow multiple programs to listen on the same port Andreas Gruenbacher
2005-01-22 20:34 ` [patch 5/13] Allow multiple programs to share the same transport Andreas Gruenbacher
2005-01-22 20:34 ` [patch 6/13] Lazy RPC receive buffer allocation Andreas Gruenbacher
2005-01-22 20:34 ` [patch 7/13] Encode and decode arbitrary XDR arrays Andreas Gruenbacher
2005-02-15 19:17 ` Trond Myklebust
2005-02-16 16:08 ` Andreas Gruenbacher
2005-02-17 14:12 ` Adrian Bunk
2005-01-22 20:34 ` [patch 8/13] Add noacl nfs mount option Andreas Gruenbacher
2005-02-15 17:24 ` Trond Myklebust
2005-02-16 16:10 ` Andreas Gruenbacher
2005-01-22 20:34 ` [patch 9/13] Infrastructure and server side of nfsacl Andreas Gruenbacher
2005-01-22 20:34 ` [patch 10/13] Solaris nfsacl workaround Andreas Gruenbacher
2005-02-15 17:29 ` Trond Myklebust
2005-02-15 20:35 ` Olivier Galibert
2005-02-15 22:43 ` Trond Myklebust
2005-02-15 23:02 ` Olivier Galibert
2005-02-15 23:37 ` Trond Myklebust
2005-02-15 23:43 ` Olivier Galibert
2005-02-16 16:17 ` Andreas Gruenbacher
2005-02-16 17:05 ` Trond Myklebust
2005-02-16 17:39 ` Andreas Gruenbacher
2005-01-22 20:34 ` [patch 11/13] Client side of nfsacl Andreas Gruenbacher
2005-02-15 17:49 ` Trond Myklebust
2005-02-22 13:41 ` Andreas Gruenbacher
2005-02-22 14:13 ` Trond Myklebust
2005-01-22 20:34 ` [patch 12/13] ACL umask handling workaround in nfs client Andreas Gruenbacher
2005-01-25 1:20 ` Andreas Gruenbacher
2005-02-15 18:04 ` Trond Myklebust
2005-02-22 16:47 ` Andreas Gruenbacher
2005-02-22 17:43 ` Trond Myklebust
2005-01-22 20:34 ` [patch 13/13] Cache acls on the nfs client side Andreas Gruenbacher
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=1108487069.10073.32.camel@lade.trondhjem.org \
--to=trond.myklebust@fys.uio.no \
--cc=Andries.Brouwer@cwi.nl \
--cc=agruen@suse.de \
--cc=akpm@osdl.org \
--cc=buchk@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@cse.unsw.edu.au \
--cc=okir@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®