summaryrefslogtreecommitdiffstats
path: root/fs/nfs/sysctl.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-01-03 09:55:57 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-01-06 14:58:58 -0500
commit58df095b732529ade8f4051b41d7c29731afecd6 (patch)
tree917819b96bac91e5daea7a31eb6eba66268952d9 /fs/nfs/sysctl.c
parent0065db328533c390fbfb0fe0c46bcf9a278fb99e (diff)
downloadop-kernel-dev-58df095b732529ade8f4051b41d7c29731afecd6.zip
op-kernel-dev-58df095b732529ade8f4051b41d7c29731afecd6.tar.gz
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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/sysctl.c b/fs/nfs/sysctl.c
index fdc64b5..4c486eb 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 }
};
OpenPOWER on IntegriCloud