]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Use very long timeout for information in the filehandle->path cache.
authorSimon Peter <simon.peter@gmx.de>
Tue, 13 Mar 2007 04:19:24 +0000 (15:19 +1100)
committerNeil Brown <neilb@suse.de>
Tue, 13 Mar 2007 04:19:24 +0000 (15:19 +1100)
/* 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>
utils/mountd/cache.c

index fbe829e2d3fc188fbe686fc78a820199b5951ac3..4693216f949e1751ccf61239e9f9296b794827f1 100644 (file)
@@ -413,7 +413,15 @@ void nfsd_fh(FILE *f)
        qword_print(f, dom);
        qword_printint(f, fsidtype);
        qword_printhex(f, fsid, fsidlen);
        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);
        if (found)
                qword_print(f, found->e_path);
        qword_eol(f);