summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2012-05-24 19:13:24 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-24 22:15:48 +0200
commit2701d086dbfca03b2d28b25c6dc11dd78d0e26ad (patch)
tree69f81dd2a979600cd3ff4f1861c6d7ef5c25b1ed /fs/nfs/inode.c
parentNFSv4.1 cache mdsthreshold values on OPEN (diff)
downloadlinux-2701d086dbfca03b2d28b25c6dc11dd78d0e26ad.tar.xz
linux-2701d086dbfca03b2d28b25c6dc11dd78d0e26ad.zip
NFSv4.1 add nfs_inode book keeping for mdsthreshold
Keep track of the number of bytes read or written via buffered, direct, and mem-mapped i/o for use by mdsthreshold size_io hints. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 889f7e5e92e1..a6f5fbbe9b9c 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -323,6 +323,8 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
inode->i_gid = -2;
inode->i_blocks = 0;
memset(nfsi->cookieverf, 0, sizeof(nfsi->cookieverf));
+ nfsi->write_io = 0;
+ nfsi->read_io = 0;
nfsi->read_cache_jiffies = fattr->time_start;
nfsi->attr_gencount = fattr->gencount;