nfsd: report per-export stats
authorAmir Goldstein <amir73il@gmail.com>
Wed, 6 Jan 2021 07:52:36 +0000 (09:52 +0200)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 25 Jan 2021 14:36:28 +0000 (09:36 -0500)
commit20ad856e47323e208ae8d6a9ecfe5bf0be6f505e
tree111fc9aa63cab904835739e51da4b1fdd9aba160
parente567b98ce9a4b35b63c364d24828a9e5cd7a8179
nfsd: report per-export stats

Collect some nfsd stats per export in addition to the global stats.

A new nfsdfs export_stats file is created.  It uses the same ops as the
exports file to iterate the export entries and we use the file's name to
determine the reported info per export.  For example:

 $ cat /proc/fs/nfsd/export_stats
 # Version 1.1
 # Path Client Start-time
 # Stats
 /test localhost 92
fh_stale: 0
io_read: 9
io_write: 1

Every export entry reports the start time when stats collection
started, so stats collecting scripts can know if stats where reset
between samples.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/export.c
fs/nfsd/export.h
fs/nfsd/nfsctl.c
fs/nfsd/nfsd.h
fs/nfsd/nfsfh.c
fs/nfsd/stats.h
fs/nfsd/vfs.c