Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360512
b: refs/heads/master
c: edddbb1
h: refs/heads/master
v: v3
  • Loading branch information
Weston Andros Adamson authored and Trond Myklebust committed Mar 1, 2013
1 parent 42de1c3 commit 732bb18
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb97cbb459c656b542101091f67ce112b3e56183
refs/heads/master: edddbb1eda61753c886a3c5e159293a7b3a9e30a
1 change: 1 addition & 0 deletions trunk/include/linux/sunrpc/clnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int);
int rpc_protocol(struct rpc_clnt *);
struct net * rpc_net_ns(struct rpc_clnt *);
size_t rpc_max_payload(struct rpc_clnt *);
unsigned long rpc_get_timeout(struct rpc_clnt *clnt);
void rpc_force_rebind(struct rpc_clnt *);
size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t);
const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t);
Expand Down
15 changes: 15 additions & 0 deletions trunk/net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,21 @@ size_t rpc_max_payload(struct rpc_clnt *clnt)
}
EXPORT_SYMBOL_GPL(rpc_max_payload);

/**
* rpc_get_timeout - Get timeout for transport in tenths of seconds
* @clnt: RPC client to query
*/
unsigned long rpc_get_timeout(struct rpc_clnt *clnt)
{
unsigned long ret;

rcu_read_lock();
ret = rcu_dereference(clnt->cl_xprt)->timeout->to_initval;
rcu_read_unlock();
return ret;
}
EXPORT_SYMBOL_GPL(rpc_get_timeout);

/**
* rpc_force_rebind - force transport to check that remote port is unchanged
* @clnt: client to rebind
Expand Down

0 comments on commit 732bb18

Please sign in to comment.