Skip to content

Commit 0dc9f43

Browse files
da-xTrond Myklebust
authored andcommitted
sunrpc: fix NFSACL RPC retry on soft mount
It used to be quite awhile ago since 1b63a75 ('SUNRPC: Refactor rpc_clone_client()'), in 2012, that `cl_timeout` was copied in so that all mount parameters propagate to NFSACL clients. However since that change, if mount options as follows are given: soft,timeo=50,retrans=16,vers=3 The resultant NFSACL client receives: cl_softrtry: 1 cl_timeout: to_initval=60000, to_maxval=60000, to_increment=0, to_retries=2, to_exponential=0 These values lead to NFSACL operations not being retried under the condition of transient network outages with soft mount. Instead, getacl call fails after 60 seconds with EIO. The simple fix is to pass the existing client's `cl_timeout` as the new client timeout. Cc: Chuck Lever <[email protected]> Cc: Benjamin Coddington <[email protected]> Link: https://lore.kernel.org/all/[email protected]/T/ Fixes: 1b63a75 ('SUNRPC: Refactor rpc_clone_client()') Signed-off-by: Dan Aloni <[email protected]> Reviewed-by: Benjamin Coddington <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 9b62ef6 commit 0dc9f43

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/sunrpc/clnt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *old,
10711071
.authflavor = old->cl_auth->au_flavor,
10721072
.cred = old->cl_cred,
10731073
.stats = old->cl_stats,
1074+
.timeout = old->cl_timeout,
10741075
};
10751076
struct rpc_clnt *clnt;
10761077
int err;

0 commit comments

Comments
 (0)