diff options
Diffstat (limited to 'include/linux/sunrpc/xprt.h')
-rw-r--r-- | include/linux/sunrpc/xprt.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index a71106723d71..4ce82616873d 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -138,6 +138,7 @@ struct rpc_xprt { | |||
138 | unsigned int tsh_size; /* size of transport specific | 138 | unsigned int tsh_size; /* size of transport specific |
139 | header */ | 139 | header */ |
140 | 140 | ||
141 | struct rpc_wait_queue binding; /* requests waiting on rpcbind */ | ||
141 | struct rpc_wait_queue sending; /* requests waiting to send */ | 142 | struct rpc_wait_queue sending; /* requests waiting to send */ |
142 | struct rpc_wait_queue resend; /* requests waiting to resend */ | 143 | struct rpc_wait_queue resend; /* requests waiting to resend */ |
143 | struct rpc_wait_queue pending; /* requests in flight */ | 144 | struct rpc_wait_queue pending; /* requests in flight */ |
@@ -270,6 +271,7 @@ int xs_setup_tcp(struct rpc_xprt *xprt, struct rpc_timeout *to); | |||
270 | #define XPRT_CONNECTING (2) | 271 | #define XPRT_CONNECTING (2) |
271 | #define XPRT_CLOSE_WAIT (3) | 272 | #define XPRT_CLOSE_WAIT (3) |
272 | #define XPRT_BOUND (4) | 273 | #define XPRT_BOUND (4) |
274 | #define XPRT_BINDING (5) | ||
273 | 275 | ||
274 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 276 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
275 | { | 277 | { |
@@ -328,6 +330,18 @@ static inline void xprt_clear_bound(struct rpc_xprt *xprt) | |||
328 | clear_bit(XPRT_BOUND, &xprt->state); | 330 | clear_bit(XPRT_BOUND, &xprt->state); |
329 | } | 331 | } |
330 | 332 | ||
333 | static inline void xprt_clear_binding(struct rpc_xprt *xprt) | ||
334 | { | ||
335 | smp_mb__before_clear_bit(); | ||
336 | clear_bit(XPRT_BINDING, &xprt->state); | ||
337 | smp_mb__after_clear_bit(); | ||
338 | } | ||
339 | |||
340 | static inline int xprt_test_and_set_binding(struct rpc_xprt *xprt) | ||
341 | { | ||
342 | return test_and_set_bit(XPRT_BINDING, &xprt->state); | ||
343 | } | ||
344 | |||
331 | #endif /* __KERNEL__*/ | 345 | #endif /* __KERNEL__*/ |
332 | 346 | ||
333 | #endif /* _LINUX_SUNRPC_XPRT_H */ | 347 | #endif /* _LINUX_SUNRPC_XPRT_H */ |