NFS: report how long an NFS file system has been mounted
Add a field in nfs_server to record a timestamp when a mount succeeds. Report the number of seconds the file system has been mounted via nfs_show_stats(). Test plan: Mount an NFS file system, watch the mountstats reports and compare with clock time. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:

committed by
Trond Myklebust

parent
006ea73e5f
commit
67ec9f46b8
@@ -35,6 +35,7 @@ struct nfs_server {
|
||||
char * hostname; /* remote hostname */
|
||||
struct nfs_fh fh;
|
||||
struct sockaddr_in addr;
|
||||
unsigned long mount_time; /* when this fs was mounted */
|
||||
#ifdef CONFIG_NFS_V4
|
||||
/* Our own IP address, as a null-terminated string.
|
||||
* This is used to generate the clientid, and the callback address.
|
||||
|
Reference in New Issue
Block a user