From: Chuck Lever Date: Mon, 1 Feb 2010 19:17:32 +0000 (-0500) Subject: NFS: Account for NFS bytes read via the splice API X-Git-Tag: v2.6.34-rc1~190^2~11 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=aa2f1ef10e6ad65c9138ec576f82c08f32e6f32c;p=karo-tx-linux.git 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 Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 7f4910c98c7c..abbc20281ea4 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; }