diff options
-rw-r--r-- | fs/nfs/inode.c | 5 | ||||
-rw-r--r-- | include/linux/nfs_fs_sb.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 8ee74111e519..1b2d782374b5 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -299,6 +299,9 @@ nfs_sb_init(struct super_block *sb, rpc_authflavor_t authflavor) | |||
299 | goto out_no_root; | 299 | goto out_no_root; |
300 | } | 300 | } |
301 | 301 | ||
302 | /* mount time stamp, in seconds */ | ||
303 | server->mount_time = jiffies; | ||
304 | |||
302 | /* Get some general file system info */ | 305 | /* Get some general file system info */ |
303 | if (server->namelen == 0 && | 306 | if (server->namelen == 0 && |
304 | server->rpc_ops->pathconf(server, &server->fh, &pathinfo) >= 0) | 307 | server->rpc_ops->pathconf(server, &server->fh, &pathinfo) >= 0) |
@@ -674,6 +677,8 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt) | |||
674 | seq_puts(m, mnt->mnt_sb->s_flags & MS_NODIRATIME ? ",nodiratime" : ""); | 677 | seq_puts(m, mnt->mnt_sb->s_flags & MS_NODIRATIME ? ",nodiratime" : ""); |
675 | nfs_show_mount_options(m, nfss, 1); | 678 | nfs_show_mount_options(m, nfss, 1); |
676 | 679 | ||
680 | seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ); | ||
681 | |||
677 | seq_printf(m, "\n\tcaps:\t"); | 682 | seq_printf(m, "\n\tcaps:\t"); |
678 | seq_printf(m, "caps=0x%x", nfss->caps); | 683 | seq_printf(m, "caps=0x%x", nfss->caps); |
679 | seq_printf(m, ",wtmult=%d", nfss->wtmult); | 684 | seq_printf(m, ",wtmult=%d", nfss->wtmult); |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index d65e69a06b72..65dec21af774 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -35,6 +35,7 @@ struct nfs_server { | |||
35 | char * hostname; /* remote hostname */ | 35 | char * hostname; /* remote hostname */ |
36 | struct nfs_fh fh; | 36 | struct nfs_fh fh; |
37 | struct sockaddr_in addr; | 37 | struct sockaddr_in addr; |
38 | unsigned long mount_time; /* when this fs was mounted */ | ||
38 | #ifdef CONFIG_NFS_V4 | 39 | #ifdef CONFIG_NFS_V4 |
39 | /* Our own IP address, as a null-terminated string. | 40 | /* Our own IP address, as a null-terminated string. |
40 | * This is used to generate the clientid, and the callback address. | 41 | * This is used to generate the clientid, and the callback address. |