From b1e1c8a05afdbbc3f217ef79c31c3b8ca302f9eb Mon Sep 17 00:00:00 2001 From: Simon Peter Date: Tue, 13 Mar 2007 15:19:24 +1100 Subject: [PATCH] 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 --- utils/mountd/cache.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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); -- 2.39.2