diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-01-03 11:55:57 +0300 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-01-06 22:58:58 +0300 |
commit | 58df095b732529ade8f4051b41d7c29731afecd6 (patch) | |
tree | 917819b96bac91e5daea7a31eb6eba66268952d9 /fs/nfs/sysctl.c | |
parent | 0065db328533c390fbfb0fe0c46bcf9a278fb99e (diff) | |
download | linux-58df095b732529ade8f4051b41d7c29731afecd6.tar.xz |
NFSv4: Allow entries in the idmap cache to expire
If someone changes the uid/gid mapping in userland, then we do eventually
want those changes to be propagated to the kernel. Currently the kernel
assumes that it may cache entries forever.
Add an expiration time + garbage collector for idmap entries.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/sysctl.c')
-rw-r--r-- | fs/nfs/sysctl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/sysctl.c b/fs/nfs/sysctl.c index fdc64b59a4ee..4c486eb867ca 100644 --- a/fs/nfs/sysctl.c +++ b/fs/nfs/sysctl.c @@ -11,6 +11,7 @@ #include <linux/sysctl.h> #include <linux/module.h> #include <linux/nfs4.h> +#include <linux/nfs_idmap.h> #include "callback.h" @@ -35,6 +36,15 @@ static ctl_table nfs_cb_sysctls[] = { .extra1 = (int *)&nfs_set_port_min, .extra2 = (int *)&nfs_set_port_max, }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "idmap_cache_timeout", + .data = &nfs_idmap_cache_timeout, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + .strategy = &sysctl_jiffies, + }, #endif { .ctl_name = 0 } }; |