sunrpc: add a new cache_detail operation for when a cache is flushed
authorJeff Layton <jeff.layton@primarydata.com>
Sun, 18 Aug 2019 18:18:44 +0000 (14:18 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 19 Aug 2019 15:00:39 +0000 (11:00 -0400)
commitf69d6d8eef7807f8d937b81da24bebd2e926e4d2
tree32597d19a96925f26e143ec5fff212d0e89e3e2b
parent4866073e6ddf03066c925d3237903d7f4ca68982
sunrpc: add a new cache_detail operation for when a cache is flushed

When the exports table is changed, exportfs will usually write a new
time to the "flush" file in the nfsd.export cache procfile. This tells
the kernel to flush any entries that are older than that value.

This gives us a mechanism to tell whether an unexport might have
occurred. Add a new ->flush cache_detail operation that is called after
flushing the cache whenever someone writes to a "flush" file.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
include/linux/sunrpc/cache.h
net/sunrpc/cache.c