aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2010-09-29 15:41:49 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-10-07 18:48:49 -0400
commit955a857e062642cd3ebe1dc7bb38c0f85d8f8f17 (patch)
treef95fc349c245c4a0a3f6f8fcc5bf02f36a756134 /fs/nfs/inode.c
parentaa510da5bfe1dfe263215fd0e05dac96e738a782 (diff)
NFS: new idmapper
This patch creates a new idmapper system that uses the request-key function to place a call into userspace to map user and group ids to names. The old idmapper was single threaded, which prevented more than one request from running at a single time. This means that a user would have to wait for an upcall to finish before accessing a cached result. The upcall result is stored on a keyring of type id_resolver. See the file Documentation/filesystems/nfs/idmapper.txt for instructions. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> [Trond: fix up the return value of nfs_idmap_lookup_name and clean up code] Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 18be041abd23..f2d2c801e0af 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1526,6 +1526,10 @@ static int __init init_nfs_fs(void)
1526{ 1526{
1527 int err; 1527 int err;
1528 1528
1529 err = nfs_idmap_init();
1530 if (err < 0)
1531 goto out9;
1532
1529 err = nfs_dns_resolver_init(); 1533 err = nfs_dns_resolver_init();
1530 if (err < 0) 1534 if (err < 0)
1531 goto out8; 1535 goto out8;
@@ -1590,6 +1594,8 @@ out6:
1590out7: 1594out7:
1591 nfs_dns_resolver_destroy(); 1595 nfs_dns_resolver_destroy();
1592out8: 1596out8:
1597 nfs_idmap_quit();
1598out9:
1593 return err; 1599 return err;
1594} 1600}
1595 1601
@@ -1602,6 +1608,7 @@ static void __exit exit_nfs_fs(void)
1602 nfs_destroy_nfspagecache(); 1608 nfs_destroy_nfspagecache();
1603 nfs_fscache_unregister(); 1609 nfs_fscache_unregister();
1604 nfs_dns_resolver_destroy(); 1610 nfs_dns_resolver_destroy();
1611 nfs_idmap_quit();
1605#ifdef CONFIG_PROC_FS 1612#ifdef CONFIG_PROC_FS
1606 rpc_proc_unregister("nfs"); 1613 rpc_proc_unregister("nfs");
1607#endif 1614#endif