NFSv41: Resend on NFS4ERR_RETRY_UNCACHED_REP
Subsystems (2)
PATCH 1/1 NFSv41: Resend on NFS4ERR_RETRY_UNCACHED_REP
From: Andy Adamson <[email protected]>
Free the slot and resend the RPC with new session <slot#,seq#>.
For nfs4_async_handle_error, return -EAGAIN and set the task->tk_status to 0 to restart the async rpc in the rpc_restart_call_prepare state which resets the slot.
For nfs4_handle_exception, retrying a call that uses nfs4_call_sync will reset the slot via nfs41_call_sync_prepare.
--- fs/nfs/nfs4proc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
fs/nfs/nfs4proc.c +2 -0
@@ -300,6 +300,7 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc ret =nfs4_delay (server->client, &exception->timeout);if (ret !=0 )break ; +case -NFS4ERR_RETRY_UNCACHED_REP :case -NFS4ERR_OLD_STATEID : exception->retry =1 ;break ;
@@ -3677,6 +3678,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server,rpc_delay (task,NFS4_POLL_RETRY_MAX ); task->tk_status =0 ;return -EAGAIN ; +case -NFS4ERR_RETRY_UNCACHED_REP :case -NFS4ERR_OLD_STATEID : task->tk_status =0 ;return -EAGAIN ;
Signature · 1 line
1.7.3.1
Quoted 29 lines · On Mon, 2011-05-02 at 21:54 -0400, [email protected] wrote:
From: Andy Adamson <[email protected]>
Free the slot and resend the RPC with new session <slot#,seq#>.
For
nfs4_async_handle_error, return-EAGAINand set thetask->tk_statusto 0 to restart the async rpc in therpc_restart_call_preparestate which resets the slot.For
nfs4_handle_exception, retrying a call that usesnfs4_call_syncwill reset the slot vianfs41_call_sync_prepare.Signed-off-by Andy Adamson <[email protected]>--- fs/nfs/nfs4proc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)fs/nfs/nfs4proc.c +1
-0@@ -300,6 +300,7 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc ret =nfs4_delay (server->client, &exception->timeout);if (ret !=0 )break ; +case -NFS4ERR_RETRY_UNCACHED_REP :case -NFS4ERR_OLD_STATEID : exception->retry =1 ;break ;
fs/nfs/nfs4proc.c nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, · line 3684
Quoted 7 lines
fs/nfs/nfs4proc.c +1
-0@@ -3677,6 +3678,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server,rpc_delay (task,NFS4_POLL_RETRY_MAX ); task->tk_status =0 ;return -EAGAIN ; +case -NFS4ERR_RETRY_UNCACHED_REP :case -NFS4ERR_OLD_STATEID : task->tk_status =0 ;return -EAGAIN ;
Looks good... Do we need handlers for this in things like 'reclaim_complete_done()' and 'nfs41_sequence_handle_errors()'?
I'm assuming that all the stateful operations such as open/close/... set the cache reply flag and so don't need it?
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
Quoted 32 lines · Trond Myklebust
Quoted 31 lines · On Mon, 2011-05-02 at 21:54 -0400, [email protected] wrote:
From: Andy Adamson <[email protected]>
Free the slot and resend the RPC with new session <slot#,seq#>.
For
nfs4_async_handle_error, return-EAGAINand set thetask->tk_statusto 0 to restart the async rpc in therpc_restart_call_preparestate which resets the slot.For
nfs4_handle_exception, retrying a call that usesnfs4_call_syncwill reset the slot vianfs41_call_sync_prepare.Signed-off-by Andy Adamson <[email protected]>---
fs/nfs/nfs4proc.c| 2 ++1 files changed, 2 insertions(+), 0 deletions(-)fs/nfs/nfs4proc.c +1
-0@@ -300,6 +300,7 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc ret =nfs4_delay (server->client, &exception->timeout);if (ret !=0 )break ; +case -NFS4ERR_RETRY_UNCACHED_REP :case -NFS4ERR_OLD_STATEID : exception->retry =1 ;break ;@@ -3677,6 +3678,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server,rpc_delay (task,NFS4_POLL_RETRY_MAX ); task->tk_status =0 ;
Quoted 8 lines
fs/nfs/nfs4proc.c nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, · line 3684
Quoted 5 lines
fs/nfs/nfs4proc.c +1
-0return -EAGAIN ; +case -NFS4ERR_RETRY_UNCACHED_REP :case -NFS4ERR_OLD_STATEID : task->tk_status =0 ;return -EAGAIN ;Looks good... Do we need handlers for this in things like '
reclaim_complete_done()' and 'nfs41_sequence_handle_errors()'?
We probably do. I'll check for coverage.
Quoted 3 lines
I'm assuming that all the stateful operations such as open/close/... set the cache reply flag and so don't need it?
Yes - and I'll double check.
-->Andy
Quoted 9 lines
Signature · 7 lines
-- Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com