aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfsctl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-29 17:53:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-29 17:53:25 -0400
commit71db34fc4330f7c784397acb9f1e6ee7f7b32eb2 (patch)
tree77dd08f6f778a799dcd0c48eb72d0742349df235 /fs/nfsd/nfsctl.c
parent50483c3268918ee51a56d1baa39b9149d2d0d521 (diff)
parent797a9d797f8483bb67f265c761b76dcd5a077a23 (diff)
Merge branch 'for-3.4' of git://linux-nfs.org/~bfields/linux
Pull nfsd changes from Bruce Fields: Highlights: - Benny Halevy and Tigran Mkrtchyan implemented some more 4.1 features, moving us closer to a complete 4.1 implementation. - Bernd Schubert fixed a long-standing problem with readdir cookies on ext2/3/4. - Jeff Layton performed a long-overdue overhaul of the server reboot recovery code which will allow us to deprecate the current code (a rather unusual user of the vfs), and give us some needed flexibility for further improvements. - Like the client, we now support numeric uid's and gid's in the auth_sys case, allowing easier upgrades from NFSv2/v3 to v4.x. Plus miscellaneous bugfixes and cleanup. Thanks to everyone! There are also some delegation fixes waiting on vfs review that I suppose will have to wait for 3.5. With that done I think we'll finally turn off the "EXPERIMENTAL" dependency for v4 (though that's mostly symbolic as it's been on by default in distro's for a while). And the list of 4.1 todo's should be achievable for 3.5 as well: http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues though we may still want a bit more experience with it before turning it on by default. * 'for-3.4' of git://linux-nfs.org/~bfields/linux: (55 commits) nfsd: only register cld pipe notifier when CONFIG_NFSD_V4 is enabled nfsd4: use auth_unix unconditionally on backchannel nfsd: fix NULL pointer dereference in cld_pipe_downcall nfsd4: memory corruption in numeric_name_to_id() sunrpc: skip portmap calls on sessions backchannel nfsd4: allow numeric idmapping nfsd: don't allow legacy client tracker init for anything but init_net nfsd: add notifier to handle mount/unmount of rpc_pipefs sb nfsd: add the infrastructure to handle the cld upcall nfsd: add a header describing upcall to nfsdcld nfsd: add a per-net-namespace struct for nfsd sunrpc: create nfsd dir in rpc_pipefs nfsd: add nfsd4_client_tracking_ops struct and a way to set it nfsd: convert nfs4_client->cl_cb_flags to a generic flags field NFSD: Fix nfs4_verifier memory alignment NFSD: Fix warnings when NFSD_DEBUG is not defined nfsd: vfs_llseek() with 32 or 64 bit offsets (hashes) nfsd: rename 'int access' to 'int may_flags' in nfsd_open() ext4: return 32/64-bit dir name hash according to usage type fs: add new FMODE flags: FMODE_32bithash and FMODE_64bithash ...
Diffstat (limited to 'fs/nfsd/nfsctl.c')
-rw-r--r--fs/nfsd/nfsctl.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 64c24af8d7ea..2c53be6d3579 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -13,12 +13,14 @@
13#include <linux/sunrpc/clnt.h> 13#include <linux/sunrpc/clnt.h>
14#include <linux/sunrpc/gss_api.h> 14#include <linux/sunrpc/gss_api.h>
15#include <linux/sunrpc/gss_krb5_enctypes.h> 15#include <linux/sunrpc/gss_krb5_enctypes.h>
16#include <linux/sunrpc/rpc_pipe_fs.h>
16#include <linux/module.h> 17#include <linux/module.h>
17 18
18#include "idmap.h" 19#include "idmap.h"
19#include "nfsd.h" 20#include "nfsd.h"
20#include "cache.h" 21#include "cache.h"
21#include "fault_inject.h" 22#include "fault_inject.h"
23#include "netns.h"
22 24
23/* 25/*
24 * We have a single directory with several nodes in it. 26 * We have a single directory with several nodes in it.
@@ -1124,14 +1126,26 @@ static int create_proc_exports_entry(void)
1124} 1126}
1125#endif 1127#endif
1126 1128
1129int nfsd_net_id;
1130static struct pernet_operations nfsd_net_ops = {
1131 .id = &nfsd_net_id,
1132 .size = sizeof(struct nfsd_net),
1133};
1134
1127static int __init init_nfsd(void) 1135static int __init init_nfsd(void)
1128{ 1136{
1129 int retval; 1137 int retval;
1130 printk(KERN_INFO "Installing knfsd (copyright (C) 1996 okir@monad.swb.de).\n"); 1138 printk(KERN_INFO "Installing knfsd (copyright (C) 1996 okir@monad.swb.de).\n");
1131 1139
1132 retval = nfsd4_init_slabs(); 1140 retval = register_cld_notifier();
1133 if (retval) 1141 if (retval)
1134 return retval; 1142 return retval;
1143 retval = register_pernet_subsys(&nfsd_net_ops);
1144 if (retval < 0)
1145 goto out_unregister_notifier;
1146 retval = nfsd4_init_slabs();
1147 if (retval)
1148 goto out_unregister_pernet;
1135 nfs4_state_init(); 1149 nfs4_state_init();
1136 retval = nfsd_fault_inject_init(); /* nfsd fault injection controls */ 1150 retval = nfsd_fault_inject_init(); /* nfsd fault injection controls */
1137 if (retval) 1151 if (retval)
@@ -1169,6 +1183,10 @@ out_free_stat:
1169 nfsd_fault_inject_cleanup(); 1183 nfsd_fault_inject_cleanup();
1170out_free_slabs: 1184out_free_slabs:
1171 nfsd4_free_slabs(); 1185 nfsd4_free_slabs();
1186out_unregister_pernet:
1187 unregister_pernet_subsys(&nfsd_net_ops);
1188out_unregister_notifier:
1189 unregister_cld_notifier();
1172 return retval; 1190 return retval;
1173} 1191}
1174 1192
@@ -1184,6 +1202,8 @@ static void __exit exit_nfsd(void)
1184 nfsd4_free_slabs(); 1202 nfsd4_free_slabs();
1185 nfsd_fault_inject_cleanup(); 1203 nfsd_fault_inject_cleanup();
1186 unregister_filesystem(&nfsd_fs_type); 1204 unregister_filesystem(&nfsd_fs_type);
1205 unregister_pernet_subsys(&nfsd_net_ops);
1206 unregister_cld_notifier();
1187} 1207}
1188 1208
1189MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>"); 1209MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>");