OSDN Git Service

nfsd: report client confirmation status in "info" file
authorNeilBrown <neilb@suse.de>
Fri, 19 Mar 2021 22:38:04 +0000 (09:38 +1100)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 22 Mar 2021 14:19:04 +0000 (10:19 -0400)
commit472d155a0631bd1a09b5c0c275a254e65605d683
tree7848a182df455aa12d43bf624aa8488125709d9d
parente7a833e9cc6c3b58fe94f049d2b40943cba07086
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>
fs/nfsd/nfs4state.c
fs/nfsd/nfsctl.c
fs/nfsd/nfsd.h
fs/nfsd/state.h