diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2010-02-01 14:17:32 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-02-10 08:31:03 -0500 |
commit | aa2f1ef10e6ad65c9138ec576f82c08f32e6f32c (patch) | |
tree | 8a44d88ca97828af2ec7cfae3b779504ed2f2b79 /fs/nfs | |
parent | 4184dcf2dbde481b34d370e1704f2b91a8c9f0d1 (diff) | |
download | linux-3.10-aa2f1ef10e6ad65c9138ec576f82c08f32e6f32c.tar.gz linux-3.10-aa2f1ef10e6ad65c9138ec576f82c08f32e6f32c.tar.bz2 linux-3.10-aa2f1ef10e6ad65c9138ec576f82c08f32e6f32c.zip |
NFS: Account for NFS bytes read via the splice API
Bytes read via the splice API should be accounted for in the NFS
performance statistics.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 7f4910c98c7..abbc20281ea 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -284,8 +284,11 @@ nfs_file_splice_read(struct file *filp, loff_t *ppos, (unsigned long) count, (unsigned long long) *ppos); res = nfs_revalidate_mapping(inode, filp->f_mapping); - if (!res) + if (!res) { res = generic_file_splice_read(filp, ppos, pipe, count, flags); + if (res > 0) + nfs_add_stats(inode, NFSIOS_NORMALREADBYTES, res); + } return res; } |