summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Peter <simon.peter@gmx.de>2007-03-13 15:19:24 +1100
committerNeil Brown <neilb@suse.de>2007-03-13 15:19:24 +1100
commitb1e1c8a05afdbbc3f217ef79c31c3b8ca302f9eb (patch)
treed4a8c7d9d9f9a9eff2c50c6f8a8e5e544f10dcc4
parente6e19816da66cde1cc4fd062c898ce66a9b4e336 (diff)
downloadnfs-utils-b1e1c8a05afdbbc3f217ef79c31c3b8ca302f9eb.tar.gz
nfs-utils-b1e1c8a05afdbbc3f217ef79c31c3b8ca302f9eb.tar.xz
nfs-utils-b1e1c8a05afdbbc3f217ef79c31c3b8ca302f9eb.zip
Use very long timeout for information in the filehandle->path cache.
/* The fsid -> path lookup can be quite expensive as it * potentially stats and reads lots of devices, and some of those * might have spun-down. The Answer is not likely to * change underneath us, and an 'exportfs -f' can always * remove this from the kernel, so use a really log * timeout. Maybe this should be configurable on the command * line. */ Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r--utils/mountd/cache.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
index fbe829e..4693216 100644
--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -413,7 +413,15 @@ void nfsd_fh(FILE *f)
qword_print(f, dom);
qword_printint(f, fsidtype);
qword_printhex(f, fsid, fsidlen);
- qword_printint(f, time(0)+30*60);
+ /* The fsid -> path lookup can be quite expensive as it
+ * potentially stats and reads lots of devices, and some of those
+ * might have spun-down. The Answer is not likely to
+ * change underneath us, and an 'exportfs -f' can always
+ * remove this from the kernel, so use a really log
+ * timeout. Maybe this should be configurable on the command
+ * line.
+ */
+ qword_printint(f, 0x7fffffff);
if (found)
qword_print(f, found->e_path);
qword_eol(f);