OSDN Git Service

NFS: Further fixes to the writeback error handling
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 14 May 2022 14:08:12 +0000 (10:08 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 17 May 2022 16:53:33 +0000 (12:53 -0400)
commitc6fd3511c3397dd9cbc6dc5d105bbedb69bf4061
tree67a79ca0e846578203f9e573efdcd9715ccb2228
parent3764a17e31d579cf9b4bd0a69894b577e8d75702
NFS: Further fixes to the writeback error handling

When we handle an error by redirtying the page, we're not corrupting the
mapping, so we don't want the error to be recorded in the mapping.
If the caller has specified a sync_mode of WB_SYNC_NONE, we can just
return AOP_WRITEPAGE_ACTIVATE. However if we're dealing with
WB_SYNC_ALL, we need to ensure that retries happen when the errors are
non-fatal.

Reported-by: Olga Kornievskaia <aglo@umich.edu>
Fixes: 8fc75bed96bb ("NFS: Fix up return value on fatal errors in nfs_page_async_flush()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/write.c