Re: [PATCH 1/1] NFSv41: Resend on NFS4ERR_RETRY_UNCACHED_REP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On May 3, 2011, at 4:19 PM, Trond Myklebust wrote:

> On Mon, 2011-05-02 at 21:54 -0400, andros@xxxxxxxxxx wrote:
>> From: Andy Adamson <andros@xxxxxxxxxx>
>> 
>> 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.
>> 
>> Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
>> ---
>> fs/nfs/nfs4proc.c |    2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>> 
>> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
>> index b8e1ac6..01d70dd 100644
>> --- a/fs/nfs/nfs4proc.c
>> +++ b/fs/nfs/nfs4proc.c
>> @@ -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;
> 
> 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.
 
> 
> 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

> 
> -- 
> Trond Myklebust
> Linux NFS client maintainer
> 
> NetApp
> Trond.Myklebust@xxxxxxxxxx
> www.netapp.com
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux