diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-01-03 03:55:57 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-01-06 14:58:58 -0500 |
commit | 58df095b732529ade8f4051b41d7c29731afecd6 (patch) | |
tree | 917819b96bac91e5daea7a31eb6eba66268952d9 /fs/nfs/sysctl.c | |
parent | 0065db328533c390fbfb0fe0c46bcf9a278fb99e (diff) |
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 @@ | |||
11 | #include <linux/sysctl.h> | 11 | #include <linux/sysctl.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/nfs4.h> | 13 | #include <linux/nfs4.h> |
14 | #include <linux/nfs_idmap.h> | ||
14 | 15 | ||
15 | #include "callback.h" | 16 | #include "callback.h" |
16 | 17 | ||
@@ -35,6 +36,15 @@ static ctl_table nfs_cb_sysctls[] = { | |||
35 | .extra1 = (int *)&nfs_set_port_min, | 36 | .extra1 = (int *)&nfs_set_port_min, |
36 | .extra2 = (int *)&nfs_set_port_max, | 37 | .extra2 = (int *)&nfs_set_port_max, |
37 | }, | 38 | }, |
39 | { | ||
40 | .ctl_name = CTL_UNNUMBERED, | ||
41 | .procname = "idmap_cache_timeout", | ||
42 | .data = &nfs_idmap_cache_timeout, | ||
43 | .maxlen = sizeof(int), | ||
44 | .mode = 0644, | ||
45 | .proc_handler = &proc_dointvec_jiffies, | ||
46 | .strategy = &sysctl_jiffies, | ||
47 | }, | ||
38 | #endif | 48 | #endif |
39 | { .ctl_name = 0 } | 49 | { .ctl_name = 0 } |
40 | }; | 50 | }; |