diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-15 12:26:05 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-26 15:31:29 -0400 |
commit | 8f54c7a4babf58bbaf849e126f7ae9664bdc9e04 (patch) | |
tree | 86afff853c994e30fa86df68064eb1e8578d4126 /fs/nfs/internal.h | |
parent | 7af46292dadcf8870946916f79fdddf79bd7267f (diff) | |
download | linux-8f54c7a4babf58bbaf849e126f7ae9664bdc9e04.tar.bz2 |
NFS: Fix spurious EIO read errors
If the client attempts to read a page, but the read fails due to some
spurious error (e.g. an ACCESS error or a timeout, ...) then we need
to allow other processes to retry.
Also try to report errors correctly when doing a synchronous readpage.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r-- | fs/nfs/internal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index a2346a2f8361..e64f810223be 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -775,3 +775,13 @@ static inline bool nfs_error_is_fatal(int err) } } +static inline bool nfs_error_is_fatal_on_server(int err) +{ + switch (err) { + case 0: + case -ERESTARTSYS: + case -EINTR: + return false; + } + return nfs_error_is_fatal(err); +} |