linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] NFS: Fix read_bytes for buffered reads
@ 2023-03-09 18:58 Dave Wysochanski
  2023-03-09 18:58 ` [PATCH 1/1] NFS: Fix /proc/PID/io " Dave Wysochanski
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Wysochanski @ 2023-03-09 18:58 UTC (permalink / raw)
  To: Anna Schumaker, Trond Myklebust, Daire Byrne; +Cc: linux-nfs

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(+)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-14 20:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-09 18:58 [PATCH 0/1] NFS: Fix read_bytes for buffered reads Dave Wysochanski
2023-03-09 18:58 ` [PATCH 1/1] NFS: Fix /proc/PID/io " Dave Wysochanski
2023-03-14 20:27   ` Daire Byrne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).