diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-04-14 11:42:00 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-04-14 12:26:03 -0400 |
commit | b7993cebb841b0da7a33e9d5ce301a9fd3209165 (patch) | |
tree | 62361acf994e04b3b9205d5e4a9b26c4a3193c34 /net | |
parent | ba60eb25ff6be6f8e60488cdfd454e5c612bce60 (diff) | |
download | linux-3.10-b7993cebb841b0da7a33e9d5ce301a9fd3209165.tar.gz linux-3.10-b7993cebb841b0da7a33e9d5ce301a9fd3209165.tar.bz2 linux-3.10-b7993cebb841b0da7a33e9d5ce301a9fd3209165.zip |
SUNRPC: Allow rpc_create() to request that TCP slots be unlimited
This is mainly for use by NFSv4.1, where the session negotiation
ultimately wants to decide how many RPC slots we can fill.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/clnt.c | 2 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index a80ee9b80dc..651245aa829 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -414,6 +414,8 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args) }; char servername[48]; + if (args->flags & RPC_CLNT_CREATE_INFINITE_SLOTS) + xprtargs.flags |= XPRT_CREATE_INFINITE_SLOTS; /* * If the caller chooses not to specify a hostname, whip * up a string representation of the passed-in address. diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 3081620cb02..726e702b7a2 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -2762,9 +2762,13 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args) struct rpc_xprt *xprt; struct sock_xprt *transport; struct rpc_xprt *ret; + unsigned int max_slot_table_size = xprt_max_tcp_slot_table_entries; + + if (args->flags & XPRT_CREATE_INFINITE_SLOTS) + max_slot_table_size = RPC_MAX_SLOT_TABLE_LIMIT; xprt = xs_setup_xprt(args, xprt_tcp_slot_table_entries, - xprt_max_tcp_slot_table_entries); + max_slot_table_size); if (IS_ERR(xprt)) return xprt; transport = container_of(xprt, struct sock_xprt, xprt); |