From: Simon Peter Date: Tue, 13 Mar 2007 04:19:24 +0000 (+1100) Subject: Use very long timeout for information in the filehandle->path cache. X-Git-Tag: nfs-utils-1-1-0-rc1~85 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=b1e1c8a05afdbbc3f217ef79c31c3b8ca302f9eb;ds=sidebyside 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 --- 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);