Commit 0182399b authored by Bryan Schumaker's avatar Bryan Schumaker Committed by Ben Hutchings

NFS: Wait for session recovery to finish before returning

commit 399f11c3 upstream.

Currently, we will schedule session recovery and then return to the
caller of nfs4_handle_exception.  This works for most cases, but causes
a hang on the following test case:

	Client				Server
	------				------
	Open file over NFS v4.1
	Write to file
					Expire client
	Try to lock file

The server will return NFS4ERR_BADSESSION, prompting the client to
schedule recovery.  However, the client will continue placing lock
attempts and the open recovery never seems to be scheduled.  The
simplest solution is to wait for session recovery to run before retrying
the lock.
Signed-off-by: default avatarBryan Schumaker <bjschuma@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent c2ba7256
...@@ -303,8 +303,7 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc ...@@ -303,8 +303,7 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc
dprintk("%s ERROR: %d Reset session\n", __func__, dprintk("%s ERROR: %d Reset session\n", __func__,
errorcode); errorcode);
nfs4_schedule_session_recovery(clp->cl_session); nfs4_schedule_session_recovery(clp->cl_session);
exception->retry = 1; goto wait_on_recovery;
break;
#endif /* defined(CONFIG_NFS_V4_1) */ #endif /* defined(CONFIG_NFS_V4_1) */
case -NFS4ERR_FILE_OPEN: case -NFS4ERR_FILE_OPEN:
if (exception->timeout > HZ) { if (exception->timeout > HZ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment