Re: [PATCH] SUNRPC: Add missing support for RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT

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

 



On Wed, 24 Sep 2014 22:51:19 -0400 Trond Myklebust
<trond.myklebust@xxxxxxxxxxxxxxx> wrote:

> The flag RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT was intended introduced in
> order to allow NFSv4 clients to disable resend timeouts. Since those
> cause the RPC layer to break the connection, they mess up the duplicate
> reply caches that remain indexed on the port number in NFSv4..
> 
> This patch includes the code that was missing in the original to
> set the appropriate flag in struct rpc_clnt, when the caller of
> rpc_create() sets RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT.
> 
> Fixes: 8a19a0b6cb2e (SUNRPC: Add RPC task and client level options to...)
> Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
> ---
>  net/sunrpc/clnt.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> index 488ddeed9363..841565450354 100644
> --- a/net/sunrpc/clnt.c
> +++ b/net/sunrpc/clnt.c
> @@ -461,6 +461,8 @@ struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args,
>  
>  	if (args->flags & RPC_CLNT_CREATE_AUTOBIND)
>  		clnt->cl_autobind = 1;
> +	if (args->flags & RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT)
> +		clnt->cl_noretranstimeo = 1;
>  	if (args->flags & RPC_CLNT_CREATE_DISCRTRY)
>  		clnt->cl_discrtry = 1;
>  	if (!(args->flags & RPC_CLNT_CREATE_QUIET))

Hi Trond,
 do this relate to my observation in 
    Subject: Re: NFS auto-reconnect tuning

 that NFSv4 closes a connections after the first timeout?
 This patch seems to be a step towards changing that behaviour, though it
 doesn't succeed.

You would need

@@ -580,6 +582,7 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args,
 	new->cl_autobind = 0;
 	new->cl_softrtry = clnt->cl_softrtry;
 	new->cl_discrtry = clnt->cl_discrtry;
+	new->cl_noretranstimeo = clnt->cl_noretranstimeo;
 	new->cl_chatty = clnt->cl_chatty;
 	return new;

as well.

What do you think of having the client close the connection more quickly when
there is a timeout?  There does seem to be a case for closing sooner than 30
minutes...

I must admit I'm a bit confused by these flags so I might be missing
something important.

Thanks,
NeilBrown

Attachment: signature.asc
Description: PGP signature


[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