diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-09-12 16:40:20 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-09-17 16:33:13 -0400 |
commit | d68e3c4aa416d592d79152a49af121e4ecb204e3 (patch) | |
tree | 055e7cf7fb69bc10f0b0238a87c05758ed125d61 /fs/lockd/svc.c | |
parent | 3b3e7b72239a748f516d6aee8c12df48d50e2d7e (diff) | |
download | linux-d68e3c4aa416d592d79152a49af121e4ecb204e3.tar.gz linux-d68e3c4aa416d592d79152a49af121e4ecb204e3.tar.bz2 linux-d68e3c4aa416d592d79152a49af121e4ecb204e3.zip |
lockd: add a /proc/fs/lockd/nlm_end_grace file
Add a new procfile that will allow a (privileged) userland process to
end the NLM grace period early. The basic idea here will be to have
sm-notify write to this file, if it sent out no NOTIFY requests when
it runs. In that situation, we can generally expect that there will be
no reclaim requests so the grace period can be lifted early.
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Diffstat (limited to 'fs/lockd/svc.c')
-rw-r--r-- | fs/lockd/svc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 266b67972305..8146cfe97d8d 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -36,6 +36,7 @@ #include <linux/nfs.h> #include "netns.h" +#include "procfs.h" #define NLMDBG_FACILITY NLMDBG_SVC #define LOCKD_BUFSIZE (1024 + NLMSVC_XDRSIZE) @@ -620,8 +621,15 @@ static int __init init_nlm(void) err = register_pernet_subsys(&lockd_net_ops); if (err) goto err_pernet; + + err = lockd_create_procfs(); + if (err) + goto err_procfs; + return 0; +err_procfs: + unregister_pernet_subsys(&lockd_net_ops); err_pernet: #ifdef CONFIG_SYSCTL unregister_sysctl_table(nlm_sysctl_table); @@ -634,6 +642,7 @@ static void __exit exit_nlm(void) { /* FIXME: delete all NLM clients */ nlm_shutdown_hosts(); + lockd_remove_procfs(); unregister_pernet_subsys(&lockd_net_ops); #ifdef CONFIG_SYSCTL unregister_sysctl_table(nlm_sysctl_table); |