linux/net/sunrpc
Chuck Lever cadc0fa534 SUNRPC: Simplify kernel RPC service registration
The kernel registers RPC services with the local portmapper with an
rpcbind SET upcall to the local portmapper.  Traditionally, this used
rpcbind v2 (PMAP), but registering RPC services that support IPv6
requires rpcbind v3 or v4.

Since we now want separate PF_INET and PF_INET6 listeners for each
kernel RPC service, svc_register() will do only one of those
registrations at a time.

For PF_INET, it tries an rpcb v4 SET upcall first; if that fails, it
does a legacy portmap SET.  This makes it entirely backwards
compatible with legacy user space, but allows a proper v4 SET to be
used if rpcbind is available.

For PF_INET6, it does an rpcb v4 SET upcall.  If that fails, it fails
the registration, and thus the transport creation.  This let's the
kernel detect if user space is able to support IPv6 RPC services, and
thus whether it should maintain a PF_INET6 listener for each service
at all.

This provides complete backwards compatibilty with legacy user space
that only supports rpcbind v2.  The only down-side is that registering
a new kernel RPC service may take an extra exchange with the local
portmapper on legacy systems, but this is an infrequent operation and
is done over UDP (no lingering sockets in TIMEWAIT), so it shouldn't
be consequential.

This patch is part of a series that addresses
   http://bugzilla.kernel.org/show_bug.cgi?id=12256

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2009-03-28 15:58:37 -04:00
..
auth_gss rpc: add service field to new upcall 2008-12-23 16:19:56 -05:00
xprtrdma SVCRDMA: fix recent printk format warnings. 2009-03-19 15:17:37 -04:00
Kconfig sunrpc: fix rdma dependencies 2009-02-03 15:20:13 -08:00
Makefile SUNRPC: Add a generic RPC credential 2008-03-14 13:42:38 -04:00
auth.c Merge branch 'devel' into next 2008-12-30 16:51:43 -05:00
auth_generic.c SUNRPC: Fix a performance regression in the RPC authentication code 2008-11-20 13:17:40 -08:00
auth_null.c NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid() 2008-04-19 16:54:53 -04:00
auth_unix.c SUNRPC: Use GFP_NOFS when allocating credentials 2008-07-09 12:08:48 -04:00
cache.c SUNRPC: The sunrpc server code should not be used by out-of-tree modules 2009-01-07 17:18:42 -05:00
clnt.c SUNRPC: Return EAGAIN instead of ENOTCONN when waking up xprt->pending 2009-03-11 14:38:00 -04:00
rpc_pipe.c zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
rpcb_clnt.c SUNRPC: Allow callers to pass rpcb_v4_register a NULL address 2009-03-28 15:57:00 -04:00
sched.c SUNRPC: Tighten up the task locking rules in __rpc_execute() 2009-03-10 20:33:16 -04:00
socklib.c SUNRPC: temp var should match return type of xdr_skb_read_actor 2008-01-30 02:05:43 -05:00
stats.c SUNRPC: The sunrpc server code should not be used by out-of-tree modules 2009-01-07 17:18:42 -05:00
sunrpc_syms.c SUNRPC: Move exported symbol definitions after function declaration part 2 2008-02-01 17:01:24 -05:00
svc.c SUNRPC: Simplify kernel RPC service registration 2009-03-28 15:58:37 -04:00
svc_xprt.c SUNRPC: Change svc_create_xprt() to take a @family argument 2009-03-28 15:54:36 -04:00
svcauth.c SUNRPC: The sunrpc server code should not be used by out-of-tree modules 2009-01-07 17:18:42 -05:00
svcauth_unix.c SUNRPC: The sunrpc server code should not be used by out-of-tree modules 2009-01-07 17:18:42 -05:00
svcsock.c SUNRPC: Set IPV6ONLY flag on PF_INET6 RPC listener sockets 2009-03-28 15:55:18 -04:00
sysctl.c sunrpc: fix possible overrun on read of /proc/sys/sunrpc/transports 2008-09-01 14:24:24 -04:00
timer.c SUNRPC: add EXPORT_SYMBOL_GPL for generic transport functions 2007-10-09 17:17:36 -04:00
xdr.c SUNRPC: Convert the xdr helpers and rpc_pipefs to EXPORT_SYMBOL_GPL 2008-12-23 15:21:31 -05:00
xprt.c SUNRPC: Return EAGAIN instead of ENOTCONN when waking up xprt->pending 2009-03-11 14:38:00 -04:00
xprtsock.c SUNRPC: Ensure we close the socket on EPIPE errors too... 2009-03-19 15:17:36 -04:00