aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-07 11:08:50 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-07 11:43:49 -0400
commitf39c1bfb5a03e2d255451bff05be0d7255298fa4 (patch)
treec4f7c970840e7803e22ce10809746272d23f6fde /include/linux/sunrpc
parent01913b49cf1dc6409a07dd2a4cc6af2e77f3c410 (diff)
SUNRPC: Fix a UDP transport regression
Commit 43cedbf0e8dfb9c5610eb7985d5f21263e313802 (SUNRPC: Ensure that we grab the XPRT_LOCK before calling xprt_alloc_slot) is causing hangs in the case of NFS over UDP mounts. Since neither the UDP or the RDMA transport mechanism use dynamic slot allocation, we can skip grabbing the socket lock for those transports. Add a new rpc_xprt_op to allow switching between the TCP and UDP/RDMA case. Note that the NFSv4.1 back channel assigns the slot directly through rpc_run_bc_task, so we can ignore that case. Reported-by: Dick Streefland <dick.streefland@altium.nl> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@vger.kernel.org [>= 3.1]
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/xprt.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index cff40aa7db62..bf8c49ff7530 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -114,6 +114,7 @@ struct rpc_xprt_ops {
114 void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); 114 void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize);
115 int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); 115 int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
116 void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); 116 void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
117 void (*alloc_slot)(struct rpc_xprt *xprt, struct rpc_task *task);
117 void (*rpcbind)(struct rpc_task *task); 118 void (*rpcbind)(struct rpc_task *task);
118 void (*set_port)(struct rpc_xprt *xprt, unsigned short port); 119 void (*set_port)(struct rpc_xprt *xprt, unsigned short port);
119 void (*connect)(struct rpc_task *task); 120 void (*connect)(struct rpc_task *task);
@@ -281,6 +282,8 @@ void xprt_connect(struct rpc_task *task);
281void xprt_reserve(struct rpc_task *task); 282void xprt_reserve(struct rpc_task *task);
282int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); 283int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task);
283int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); 284int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task);
285void xprt_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task);
286void xprt_lock_and_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task);
284int xprt_prepare_transmit(struct rpc_task *task); 287int xprt_prepare_transmit(struct rpc_task *task);
285void xprt_transmit(struct rpc_task *task); 288void xprt_transmit(struct rpc_task *task);
286void xprt_end_transmit(struct rpc_task *task); 289void xprt_end_transmit(struct rpc_task *task);