diff options
author | Scott Mayhew <smayhew@redhat.com> | 2017-02-15 10:21:40 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2017-02-15 10:41:59 -0500 |
commit | a15bd948606bf4816bf819c0b0c75761f3eb6359 (patch) | |
tree | b0d721f8b474f26ebe7415ecb3dae7e4a7cace15 /support/nfs/cacheio.c | |
parent | 1789737ec6dd43c9d1436aeb6c07fab52206f412 (diff) | |
download | nfs-utils-a15bd948606bf4816bf819c0b0c75761f3eb6359.tar.gz nfs-utils-a15bd948606bf4816bf819c0b0c75761f3eb6359.tar.xz nfs-utils-a15bd948606bf4816bf819c0b0c75761f3eb6359.zip |
mountd/exportfs: implement the -s/--state-directory-path option
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/nfs/cacheio.c')
-rw-r--r-- | support/nfs/cacheio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c index e5e2579..9912afa 100644 --- a/support/nfs/cacheio.c +++ b/support/nfs/cacheio.c @@ -27,6 +27,8 @@ #include <time.h> #include <errno.h> +extern struct state_paths etab; + void qword_add(char **bpp, int *lp, char *str) { char *bp = *bpp; @@ -199,7 +201,7 @@ int qword_get_uint(char **bpp, unsigned int *anint) } /* flush the kNFSd caches. - * Set the flush time to the mtime of _PATH_ETAB or + * Set the flush time to the mtime of the etab state file or * if force, to now. * the caches to flush are: * auth.unix.ip nfsd.export nfsd.fh @@ -228,7 +230,7 @@ cache_flush(int force) }; now = time(0); if (force || - stat(_PATH_ETAB, &stb) != 0 || + stat(etab.statefn, &stb) != 0 || stb.st_mtime > now) stb.st_mtime = time(0); |