diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-17 16:01:03 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-17 16:01:03 -0400 |
commit | 43cedbf0e8dfb9c5610eb7985d5f21263e313802 (patch) | |
tree | 7758630292b6a276a3db72e63803ddc02c0a4444 /include/linux/sunrpc | |
parent | f85ef69ce08bc2209858135328335f668ba35bdb (diff) |
SUNRPC: Ensure that we grab the XPRT_LOCK before calling xprt_alloc_slot
This throttles the allocation of new slots when the socket is busy
reconnecting and/or is out of buffer space.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/xprt.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 217b0206581b..a876882fb923 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -111,7 +111,7 @@ struct rpc_rqst { | |||
111 | 111 | ||
112 | struct rpc_xprt_ops { | 112 | struct rpc_xprt_ops { |
113 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); | 113 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); |
114 | int (*reserve_xprt)(struct rpc_task *task); | 114 | int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
115 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 115 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
116 | void (*rpcbind)(struct rpc_task *task); | 116 | void (*rpcbind)(struct rpc_task *task); |
117 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); | 117 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); |
@@ -271,8 +271,8 @@ struct xprt_class { | |||
271 | struct rpc_xprt *xprt_create_transport(struct xprt_create *args); | 271 | struct rpc_xprt *xprt_create_transport(struct xprt_create *args); |
272 | void xprt_connect(struct rpc_task *task); | 272 | void xprt_connect(struct rpc_task *task); |
273 | void xprt_reserve(struct rpc_task *task); | 273 | void xprt_reserve(struct rpc_task *task); |
274 | int xprt_reserve_xprt(struct rpc_task *task); | 274 | int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
275 | int xprt_reserve_xprt_cong(struct rpc_task *task); | 275 | int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
276 | int xprt_prepare_transmit(struct rpc_task *task); | 276 | int xprt_prepare_transmit(struct rpc_task *task); |
277 | void xprt_transmit(struct rpc_task *task); | 277 | void xprt_transmit(struct rpc_task *task); |
278 | void xprt_end_transmit(struct rpc_task *task); | 278 | void xprt_end_transmit(struct rpc_task *task); |