From 1275be70ca6cd6c4bec07a3381f7b510086c5526 Mon Sep 17 00:00:00 2001 From: neilbrown Date: Wed, 21 May 2003 06:25:15 +0000 Subject: Support new kernel upcalls for export cache management. --- support/nfs/cacheio.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'support/nfs/cacheio.c') diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c index 960d801..2af4fa3 100644 --- a/support/nfs/cacheio.c +++ b/support/nfs/cacheio.c @@ -19,6 +19,10 @@ #include #include #include +#include +#include +#include +#include void qword_add(char **bpp, int *lp, char *str) { @@ -214,3 +218,15 @@ int readline(int fd, char **buf, int *lenp) return 1; } + +/* Check if we should use the new caching interface + * This succeeds iff the "nfsd" filesystem is mounted on + * /proc/fs/nfs + */ +int +check_new_cache(void) +{ + struct stat stb; + return (stat("/proc/fs/nfs/filehandle", &stb) == 0); +} + -- cgit