NFSv4: Handle NFS4ERR_DELAY correctly in return-on-close

If the server sends a NFS4ERR_DELAY, then allow the caller to retry.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
Trond Myklebust 2019-09-20 07:23:42 -04:00 committed by Anna Schumaker
parent 287a9c558b
commit 078a432d1c

View File

@ -1455,6 +1455,10 @@ int pnfs_roc_done(struct rpc_task *task, struct inode *inode,
case 0: case 0:
retval = 0; retval = 0;
break; break;
case -NFS4ERR_DELAY:
/* Let the caller handle the retry */
*ret = -NFS4ERR_NOMATCHING_LAYOUT;
return 0;
case -NFS4ERR_OLD_STATEID: case -NFS4ERR_OLD_STATEID:
if (!nfs4_layoutreturn_refresh_stateid(&arg->stateid, if (!nfs4_layoutreturn_refresh_stateid(&arg->stateid,
&arg->range, inode)) &arg->range, inode))