linux-stable/net/sunrpc
Stanislav Kinsbursky eee17325f1 NFS: idmap PipeFS notifier introduced
v2:
1) Added "nfs_idmap_init" and "nfs_idmap_quit" definitions for kernels built
without CONFIG_NFS_V4 option set.

This patch subscribes NFS clients to RPC pipefs notifications. Idmap notifier
is registering on NFS module load. This notifier callback is responsible for
creation/destruction of PipeFS idmap pipe dentry for NFS4 clients.

Since ipdmap pipe is created in rpc client pipefs directory, we have make sure,
that this directory has been created already. IOW RPC client notifier callback
has been called already. To achive this, PipeFS notifier priorities has been
introduced (RPC clients notifier priority is greater than NFS idmap one).
But this approach gives another problem: unlink for RPC client directory will
be called before NFS idmap pipe unlink on UMOUNT event and will fail, because
directory is not empty.
The solution, introduced in this patch, is to try to remove client directory
once again after idmap pipe was unlinked. This looks like ugly hack, so
probably it should be replaced in some more elegant way.

Note that no locking required in notifier callback because PipeFS superblock
pointer is passed as an argument from it's creation or destruction routine and
thus we can be sure about it's validity.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-01-31 18:20:27 -05:00
..
auth_gss SUNRPC: remove RPC PipeFS mount point reference from RPC client 2012-01-31 18:20:26 -05:00
xprtrdma SUNRPC: create svc_xprt in proper network namespace 2011-12-06 16:20:42 -05:00
addr.c net: use IS_ENABLED(CONFIG_IPV6) 2011-12-11 18:25:16 -05:00
auth.c net: Remove unnecessary semicolons 2011-06-05 14:33:39 -07:00
auth_generic.c SUNRPC: Fix machine creds in generic_create_cred and generic_match 2012-01-23 14:03:46 -08:00
auth_null.c SUNRPC: Move the bound cred to struct rpc_rqst 2010-08-04 08:54:09 -04:00
auth_unix.c NFS/sunrpc: don't use a credential with extra groups. 2011-10-25 11:20:58 +02:00
backchannel_rqst.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
bc_svc.c SUNRPC: sunrpc should not explicitly depend on NFS config options 2011-07-15 09:12:23 -04:00
cache.c SUNRPC: split cache creation and PipeFS registration 2012-01-31 18:20:26 -05:00
clnt.c NFS: idmap PipeFS notifier introduced 2012-01-31 18:20:27 -05:00
Kconfig SUNRPC: sunrpc should not explicitly depend on NFS config options 2011-07-15 09:12:23 -04:00
Makefile SUNRPC: sunrpc should not explicitly depend on NFS config options 2011-07-15 09:12:23 -04:00
netns.h SUNRPC: make SUNPRC clients list per network namespace context 2012-01-31 18:20:25 -05:00
rpc_pipe.c NFS: idmap PipeFS notifier introduced 2012-01-31 18:20:27 -05:00
rpcb_clnt.c SUNRPC: remove rpcbind clients destruction on module cleanup 2011-10-25 13:20:50 +02:00
sched.c Merge branch 'master' into pm-sleep 2011-12-21 21:59:45 +01:00
socklib.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
stats.c SUNRPC: Simplify rpc_alloc_iostats by removing pointless local variable 2010-11-16 11:58:51 -05:00
sunrpc.h SUNRPC: subscribe RPC clients to pipefs notifications 2012-01-31 18:20:25 -05:00
sunrpc_syms.c SUNRPC: make SUNPRC clients list per network namespace context 2012-01-31 18:20:25 -05:00
svc.c Merge branch 'for-3.3' of git://linux-nfs.org/~bfields/linux 2012-01-14 12:26:41 -08:00
svc_xprt.c Merge branch 'for-3.3' of git://linux-nfs.org/~bfields/linux 2012-01-14 12:26:41 -08:00
svcauth.c net: sunrpc: kill unused macros 2010-12-17 15:48:21 -05:00
svcauth_unix.c net: use IS_ENABLED(CONFIG_IPV6) 2011-12-11 18:25:16 -05:00
svcsock.c Merge branch 'for-3.3' of git://linux-nfs.org/~bfields/linux 2012-01-14 12:26:41 -08:00
sysctl.c SUNRPC: make SUNPRC clients list per network namespace context 2012-01-31 18:20:25 -05:00
timer.c SUNRPC: Add documenting comments in net/sunrpc/timer.c 2009-08-09 15:09:47 -04:00
xdr.c NFSv4: include bitmap in nfsv4 get acl data 2012-01-05 10:42:42 -05:00
xprt.c SUNRPC: Ensure we always bump the backlog queue in xprt_free_slot 2011-12-01 14:16:17 -05:00
xprtsock.c SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared 2011-11-22 23:55:27 +02:00