diff options
author | NeilBrown <neilb@suse.de> | 2021-03-20 09:38:04 +1100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2021-03-22 10:19:04 -0400 |
commit | 472d155a0631bd1a09b5c0c275a254e65605d683 (patch) | |
tree | 7848a182df455aa12d43bf624aa8488125709d9d /fs/nfsd/state.h | |
parent | e7a833e9cc6c3b58fe94f049d2b40943cba07086 (diff) | |
download | lwn-472d155a0631bd1a09b5c0c275a254e65605d683.tar.gz lwn-472d155a0631bd1a09b5c0c275a254e65605d683.zip |
nfsd: report client confirmation status in "info" file
mountd can now monitor clients appearing and disappearing in
/proc/fs/nfsd/clients, and will log these events, in liu of the logging
of mount/unmount events for NFSv3.
Currently it cannot distinguish between unconfirmed clients (which might
be transient and totally uninteresting) and confirmed clients.
So add a "status: " line which reports either "confirmed" or
"unconfirmed", and use fsnotify to report that the info file
has been modified.
This requires a bit of infrastructure to keep the dentry for the "info"
file. There is no need to take a counted reference as the dentry must
remain around until the client is removed.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r-- | fs/nfsd/state.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index 73deea353169..54cab651ac1d 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h @@ -371,6 +371,10 @@ struct nfs4_client { /* debugging info directory under nfsd/clients/ : */ struct dentry *cl_nfsd_dentry; + /* 'info' file within that directory. Ref is not counted, + * but will remain valid iff cl_nfsd_dentry != NULL + */ + struct dentry *cl_nfsd_info_dentry; /* for nfs41 callbacks */ /* We currently support a single back channel with a single slot */ |