aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-01-10 07:13:19 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-31 18:20:27 -0500
commiteee17325f1dfbe004f1475743bab9e3d050d00f5 (patch)
treeca48905e04e88658cff7d1a745a12ac3c04cfd77 /fs/nfs/internal.h
parent4929d1d33fdbe8385cdd49ccd23563e9ff247ff8 (diff)
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>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index d602188f889f..2b9836fe4434 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -182,6 +182,10 @@ static inline void nfs_fs_proc_exit(void)
182{ 182{
183} 183}
184#endif 184#endif
185#ifdef CONFIG_NFS_V4
186extern spinlock_t nfs_client_lock;
187extern struct list_head nfs_client_list;
188#endif
185 189
186/* nfs4namespace.c */ 190/* nfs4namespace.c */
187#ifdef CONFIG_NFS_V4 191#ifdef CONFIG_NFS_V4