SUNRPC: Add missing support for RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT
commit2aca5b869a
upstream. 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:8a19a0b6cb
(SUNRPC: Add RPC task and client level options to...) Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dfea18f7c7
commit
69efd35950
|
@ -533,6 +533,8 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args)
|
||||||
|
|
||||||
if (args->flags & RPC_CLNT_CREATE_AUTOBIND)
|
if (args->flags & RPC_CLNT_CREATE_AUTOBIND)
|
||||||
clnt->cl_autobind = 1;
|
clnt->cl_autobind = 1;
|
||||||
|
if (args->flags & RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT)
|
||||||
|
clnt->cl_noretranstimeo = 1;
|
||||||
if (args->flags & RPC_CLNT_CREATE_DISCRTRY)
|
if (args->flags & RPC_CLNT_CREATE_DISCRTRY)
|
||||||
clnt->cl_discrtry = 1;
|
clnt->cl_discrtry = 1;
|
||||||
if (!(args->flags & RPC_CLNT_CREATE_QUIET))
|
if (!(args->flags & RPC_CLNT_CREATE_QUIET))
|
||||||
|
@ -571,6 +573,7 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args,
|
||||||
/* Turn off autobind on clones */
|
/* Turn off autobind on clones */
|
||||||
new->cl_autobind = 0;
|
new->cl_autobind = 0;
|
||||||
new->cl_softrtry = clnt->cl_softrtry;
|
new->cl_softrtry = clnt->cl_softrtry;
|
||||||
|
new->cl_noretranstimeo = clnt->cl_noretranstimeo;
|
||||||
new->cl_discrtry = clnt->cl_discrtry;
|
new->cl_discrtry = clnt->cl_discrtry;
|
||||||
new->cl_chatty = clnt->cl_chatty;
|
new->cl_chatty = clnt->cl_chatty;
|
||||||
return new;
|
return new;
|
||||||
|
|
Loading…
Reference in New Issue