aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/direct.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2012-05-24 13:13:24 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-24 16:15:48 -0400
commit2701d086dbfca03b2d28b25c6dc11dd78d0e26ad (patch)
tree69f81dd2a979600cd3ff4f1861c6d7ef5c25b1ed /fs/nfs/direct.c
parent82be417aa37c05116e310b0f2171187ea389f89b (diff)
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/direct.c')
-rw-r--r--fs/nfs/direct.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index c47a46eaf905..23d170bc44f4 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -447,6 +447,7 @@ static ssize_t nfs_direct_read(struct kiocb *iocb, const struct iovec *iov,
447 result = nfs_direct_read_schedule_iovec(dreq, iov, nr_segs, pos); 447 result = nfs_direct_read_schedule_iovec(dreq, iov, nr_segs, pos);
448 if (!result) 448 if (!result)
449 result = nfs_direct_wait(dreq); 449 result = nfs_direct_wait(dreq);
450 NFS_I(inode)->read_io += result;
450out_release: 451out_release:
451 nfs_direct_req_release(dreq); 452 nfs_direct_req_release(dreq);
452out: 453out:
@@ -785,6 +786,7 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
785 pos += vec->iov_len; 786 pos += vec->iov_len;
786 } 787 }
787 nfs_pageio_complete(&desc); 788 nfs_pageio_complete(&desc);
789 NFS_I(dreq->inode)->write_io += desc.pg_bytes_written;
788 790
789 /* 791 /*
790 * If no bytes were started, return the error, and let the 792 * If no bytes were started, return the error, and let the