diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-12-20 16:03:55 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-01-30 02:05:59 -0500 |
commit | ba7392bb37cb12781890f45d7ddee1618e33a036 (patch) | |
tree | 4c9a6cb3b22cae407f810c214275ab107ee3fc77 /net/sunrpc/xprtsock.c | |
parent | 2881ae74e68ecfe3b32a90936e5d93a9ba598c3a (diff) | |
download | kernel-crypto-ba7392bb37cb12781890f45d7ddee1618e33a036.tar.gz kernel-crypto-ba7392bb37cb12781890f45d7ddee1618e33a036.tar.xz kernel-crypto-ba7392bb37cb12781890f45d7ddee1618e33a036.zip |
SUNRPC: Add support for per-client timeout values
In order to be able to support setting the timeo and retrans parameters on
a per-mountpoint basis, we move the rpc_timeout structure into the
rpc_clnt.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index d7b07ac5b71..6ba329d339a 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -1912,7 +1912,6 @@ static struct rpc_xprt *xs_setup_udp(struct xprt_create *args) struct sockaddr *addr = args->dstaddr; struct rpc_xprt *xprt; struct sock_xprt *transport; - const struct rpc_timeout *timeo = &xs_udp_default_timeout; xprt = xs_setup_xprt(args, xprt_udp_slot_table_entries); if (IS_ERR(xprt)) @@ -1931,9 +1930,7 @@ static struct rpc_xprt *xs_setup_udp(struct xprt_create *args) xprt->ops = &xs_udp_ops; - if (args->timeout != NULL) - timeo = args->timeout; - memcpy(&xprt->timeout, timeo, sizeof(xprt->timeout)); + xprt->timeout = &xs_udp_default_timeout; switch (addr->sa_family) { case AF_INET: @@ -1984,7 +1981,6 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args) struct sockaddr *addr = args->dstaddr; struct rpc_xprt *xprt; struct sock_xprt *transport; - const struct rpc_timeout *timeo = &xs_tcp_default_timeout; xprt = xs_setup_xprt(args, xprt_tcp_slot_table_entries); if (IS_ERR(xprt)) @@ -2001,10 +1997,7 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args) xprt->idle_timeout = XS_IDLE_DISC_TO; xprt->ops = &xs_tcp_ops; - - if (args->timeout != NULL) - timeo = args->timeout; - memcpy(&xprt->timeout, timeo, sizeof(xprt->timeout)); + xprt->timeout = &xs_tcp_default_timeout; switch (addr->sa_family) { case AF_INET: |