mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
pNFS/files: Fall back to I/O through the MDS on non-fatal layout errors
Only report the error when the server is returning a fatal error, such as ESTALE, EIO, etc... Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
c6fd3511c3
commit
126966dded
1 changed files with 6 additions and 1 deletions
|
@ -839,7 +839,12 @@ fl_pnfs_update_layout(struct inode *ino,
|
|||
|
||||
lseg = pnfs_update_layout(ino, ctx, pos, count, iomode, strict_iomode,
|
||||
gfp_flags);
|
||||
if (IS_ERR_OR_NULL(lseg))
|
||||
if (IS_ERR(lseg)) {
|
||||
/* Fall back to MDS on recoverable errors */
|
||||
if (!nfs_error_is_fatal_on_server(PTR_ERR(lseg)))
|
||||
lseg = NULL;
|
||||
goto out;
|
||||
} else if (!lseg)
|
||||
goto out;
|
||||
|
||||
lo = NFS_I(ino)->layout;
|
||||
|
|
Loading…
Reference in a new issue