]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix fscache read from NFS after cache error
authorDave Wysochanski <dwysocha@redhat.com>
Tue, 29 Jun 2021 17:13:57 +0000 (13:13 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 8 Jul 2021 18:03:26 +0000 (14:03 -0400)
commit449e33cfa2c3d0fb4316dfccffba8970686687d9
tree375c0ed4124f0cc338b960d20bf66d4d36dcba40
parent36648a60472ccf18c739dfaf576c5b0ea3bcb03b
NFS: Fix fscache read from NFS after cache error

Earlier commits refactored some NFS read code and removed
nfs_readpage_async(), but neglected to properly fixup
nfs_readpage_from_fscache_complete().  The code path is
only hit when something unusual occurs with the cachefiles
backing filesystem, such as an IO error or while a cookie
is being invalidated.

Mark page with PG_checked if fscache IO completes in error,
unlock the page, and let the VM decide to re-issue based on
PG_uptodate.  When the VM reissues the readpage, PG_checked
allows us to skip over fscache and read from the server.

Link: https://marc.info/?l=linux-nfs&m=162498209518739
Fixes: e63672374c73 ("NFS: Add nfs_pageio_complete_read() and remove nfs_readpage_async()")
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/fscache.c
fs/nfs/read.c