Commit 8ef2f8d4 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

NFS: Implement support for NFS4ERR_LEASE_MOVED

Trigger lease-moved recovery when a request returns
NFS4ERR_LEASE_MOVED.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent b7f7a66e
...@@ -389,6 +389,9 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc ...@@ -389,6 +389,9 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc
if (ret < 0) if (ret < 0)
break; break;
goto wait_on_recovery; goto wait_on_recovery;
case -NFS4ERR_LEASE_MOVED:
nfs4_schedule_lease_moved_recovery(clp);
goto wait_on_recovery;
#if defined(CONFIG_NFS_V4_1) #if defined(CONFIG_NFS_V4_1)
case -NFS4ERR_BADSESSION: case -NFS4ERR_BADSESSION:
case -NFS4ERR_BADSLOT: case -NFS4ERR_BADSLOT:
...@@ -1578,6 +1581,9 @@ static int nfs4_handle_delegation_recall_error(struct nfs_server *server, struct ...@@ -1578,6 +1581,9 @@ static int nfs4_handle_delegation_recall_error(struct nfs_server *server, struct
case -NFS4ERR_MOVED: case -NFS4ERR_MOVED:
nfs4_schedule_migration_recovery(server); nfs4_schedule_migration_recovery(server);
return -EAGAIN; return -EAGAIN;
case -NFS4ERR_LEASE_MOVED:
nfs4_schedule_lease_moved_recovery(server->nfs_client);
return -EAGAIN;
case -NFS4ERR_DELEG_REVOKED: case -NFS4ERR_DELEG_REVOKED:
case -NFS4ERR_ADMIN_REVOKED: case -NFS4ERR_ADMIN_REVOKED:
case -NFS4ERR_BAD_STATEID: case -NFS4ERR_BAD_STATEID:
...@@ -4758,6 +4764,9 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, ...@@ -4758,6 +4764,9 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server,
if (nfs4_schedule_migration_recovery(server) < 0) if (nfs4_schedule_migration_recovery(server) < 0)
goto recovery_failed; goto recovery_failed;
goto wait_on_recovery; goto wait_on_recovery;
case -NFS4ERR_LEASE_MOVED:
nfs4_schedule_lease_moved_recovery(clp);
goto wait_on_recovery;
#if defined(CONFIG_NFS_V4_1) #if defined(CONFIG_NFS_V4_1)
case -NFS4ERR_BADSESSION: case -NFS4ERR_BADSESSION:
case -NFS4ERR_BADSLOT: case -NFS4ERR_BADSLOT:
......
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