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) |
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 d7b07ac5b710..6ba329d339a2 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) | |||
1912 | struct sockaddr *addr = args->dstaddr; | 1912 | struct sockaddr *addr = args->dstaddr; |
1913 | struct rpc_xprt *xprt; | 1913 | struct rpc_xprt *xprt; |
1914 | struct sock_xprt *transport; | 1914 | struct sock_xprt *transport; |
1915 | const struct rpc_timeout *timeo = &xs_udp_default_timeout; | ||
1916 | 1915 | ||
1917 | xprt = xs_setup_xprt(args, xprt_udp_slot_table_entries); | 1916 | xprt = xs_setup_xprt(args, xprt_udp_slot_table_entries); |
1918 | if (IS_ERR(xprt)) | 1917 | if (IS_ERR(xprt)) |
@@ -1931,9 +1930,7 @@ static struct rpc_xprt *xs_setup_udp(struct xprt_create *args) | |||
1931 | 1930 | ||
1932 | xprt->ops = &xs_udp_ops; | 1931 | xprt->ops = &xs_udp_ops; |
1933 | 1932 | ||
1934 | if (args->timeout != NULL) | 1933 | xprt->timeout = &xs_udp_default_timeout; |
1935 | timeo = args->timeout; | ||
1936 | memcpy(&xprt->timeout, timeo, sizeof(xprt->timeout)); | ||
1937 | 1934 | ||
1938 | switch (addr->sa_family) { | 1935 | switch (addr->sa_family) { |
1939 | case AF_INET: | 1936 | case AF_INET: |
@@ -1984,7 +1981,6 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args) | |||
1984 | struct sockaddr *addr = args->dstaddr; | 1981 | struct sockaddr *addr = args->dstaddr; |
1985 | struct rpc_xprt *xprt; | 1982 | struct rpc_xprt *xprt; |
1986 | struct sock_xprt *transport; | 1983 | struct sock_xprt *transport; |
1987 | const struct rpc_timeout *timeo = &xs_tcp_default_timeout; | ||
1988 | 1984 | ||
1989 | xprt = xs_setup_xprt(args, xprt_tcp_slot_table_entries); | 1985 | xprt = xs_setup_xprt(args, xprt_tcp_slot_table_entries); |
1990 | if (IS_ERR(xprt)) | 1986 | if (IS_ERR(xprt)) |
@@ -2001,10 +1997,7 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args) | |||
2001 | xprt->idle_timeout = XS_IDLE_DISC_TO; | 1997 | xprt->idle_timeout = XS_IDLE_DISC_TO; |
2002 | 1998 | ||
2003 | xprt->ops = &xs_tcp_ops; | 1999 | xprt->ops = &xs_tcp_ops; |
2004 | 2000 | xprt->timeout = &xs_tcp_default_timeout; | |
2005 | if (args->timeout != NULL) | ||
2006 | timeo = args->timeout; | ||
2007 | memcpy(&xprt->timeout, timeo, sizeof(xprt->timeout)); | ||
2008 | 2001 | ||
2009 | switch (addr->sa_family) { | 2002 | switch (addr->sa_family) { |
2010 | case AF_INET: | 2003 | case AF_INET: |