Commit aa2f1ef1 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

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: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 4184dcf2
...@@ -284,8 +284,11 @@ nfs_file_splice_read(struct file *filp, loff_t *ppos, ...@@ -284,8 +284,11 @@ nfs_file_splice_read(struct file *filp, loff_t *ppos,
(unsigned long) count, (unsigned long long) *ppos); (unsigned long) count, (unsigned long long) *ppos);
res = nfs_revalidate_mapping(inode, filp->f_mapping); res = nfs_revalidate_mapping(inode, filp->f_mapping);
if (!res) if (!res) {
res = generic_file_splice_read(filp, ppos, pipe, count, flags); res = generic_file_splice_read(filp, ppos, pipe, count, flags);
if (res > 0)
nfs_add_stats(inode, NFSIOS_NORMALREADBYTES, res);
}
return res; return res;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment