diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2012-07-11 16:30:41 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-07-16 15:12:15 -0400 |
commit | 46a87b8a7b939900d779042da7097bf330ab787f (patch) | |
tree | eed7d8d57049ca7278647ea714fb21a6d7b3350f /fs/nfs | |
parent | 6a1a1e34dc55f17e7bd260809207442dbb7a0296 (diff) | |
download | op-kernel-dev-46a87b8a7b939900d779042da7097bf330ab787f.zip op-kernel-dev-46a87b8a7b939900d779042da7097bf330ab787f.tar.gz |
NFS: When state recovery fails, waiting tasks should exit
NFSv4 state recovery is not always successful. Failure is signalled
by setting the nfs_client.cl_cons_state to a negative (errno) value,
then waking waiters.
Currently this can happen only during mount processing. I'm about to
add an explicit case where state recovery failure during normal
operation should force all NFS requests waiting on that state recovery
to exit.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 80bb505..74dcd85 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -258,7 +258,12 @@ static int nfs4_wait_clnt_recover(struct nfs_client *clp) res = wait_on_bit(&clp->cl_state, NFS4CLNT_MANAGER_RUNNING, nfs_wait_bit_killable, TASK_KILLABLE); - return res; + if (res) + return res; + + if (clp->cl_cons_state < 0) + return clp->cl_cons_state; + return 0; } static int nfs4_delay(struct rpc_clnt *clnt, long *timeout) |