Skip to content

NFS: Fix read_bytes for buffered reads

Dave Wysochanski linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1NFS: Fix /proc/PID/io read_bytes for buffered readsfs/nfs/read.c+3 -01 reply

Reviews trailers per patch

The patch has no Reviewed-by or Acked-by.

PatchDaire Byrne
1/1T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/1] NFS: Fix read_bytes for buffered reads

This patch fixes the read_bytes count for NFS buffered reads. Simple reproducer follows.

Before this patch:

# mount 127.0.0.1:/ /mnt/nfs
# bash
# function dump_stats { cat /proc/$$/io; }
# trap dump_stats EXIT
# cat /mnt/nfs/file1.bin > /dev/null
# exit
exit
rchar: 3587436
wchar: 1054077
syscr: 544
syscw: 33
read_bytes: 0
write_bytes: 0
cancelled_write_bytes: 0

After this patch:

# mount 127.0.0.1:/ /mnt/nfs
# bash
# function dump_stats { cat /proc/$$/io; }
# trap dump_stats EXIT
# cat /mnt/nfs/file1.bin > /dev/null
# exit
exit
rchar: 3587278
wchar: 1054161
syscr: 544
syscw: 33
read_bytes: 1048576
write_bytes: 0
cancelled_write_bytes: 0

Dave Wysochanski (1):
NFS: Fix /proc/PID/io read_bytes for buffered reads

 fs/nfs/read.c | 3 +++
 1 file changed, 3 insertions(+)
Signature · 1 line
2.31.1