]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NFS: Fix /proc/PID/io read_bytes for buffered reads
authorDave Wysochanski <dwysocha@redhat.com>
Thu, 9 Mar 2023 18:58:52 +0000 (13:58 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 24 Mar 2023 14:25:31 +0000 (10:25 -0400)
commit026c1b29666e17dc7ba34f5fc7ee9c2910193788
tree38d5c53b81f81a8962d9e630182b3f62bbd73145
parente8d018dd0257f744ca50a729e3d042cf2ec9da65
NFS: Fix /proc/PID/io read_bytes for buffered reads

Prior to commit 8786fde8421c ("Convert NFS from readpages to
readahead"), nfs_readpages() used the old mm interface read_cache_pages()
which called task_io_account_read() for each NFS page read.  After
this commit, nfs_readpages() is converted to nfs_readahead(), which
now uses the new mm interface readahead_page().  The new interface
requires callers to call task_io_account_read() themselves.
In addition, to nfs_readahead() task_io_account_read() should also
be called from nfs_read_folio().

Fixes: 8786fde8421c ("Convert NFS from readpages to readahead")
Link: https://lore.kernel.org/linux-nfs/CAPt2mGNEYUk5u8V4abe=5MM5msZqmvzCVrtCP4Qw1n=gCHCnww@mail.gmail.com/
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/read.c