diff options
author | Chuck Lever <cel@citi.umich.edu> | 2005-08-11 16:25:47 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-09-23 12:38:26 -0400 |
commit | 55aa4f58aa43dc9a51fb80010630d94b96053a2e (patch) | |
tree | 7b3d79bdc15c76c25d8a53437b9e4173ebc68f24 /include/linux/sunrpc/xprt.h | |
parent | 44fbac2288dfed6f1963ac00bf922c3bcd779cd1 (diff) |
[PATCH] RPC: client-side transport switch cleanup
Clean-up: change some comments to reflect the realities of the new RPC
transport switch mechanism. Get rid of unused xprt_receive() prototype.
Also, organize function prototypes in xprt.h by usage and scope.
Test-plan:
Compile kernel with CONFIG_NFS enabled.
Version: Thu, 11 Aug 2005 16:07:21 -0400
Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc/xprt.h')
-rw-r--r-- | include/linux/sunrpc/xprt.h | 61 |
1 files changed, 35 insertions, 26 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index d5223993fca9..bfbc492ae36d 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/linux/sunrpc/clnt_xprt.h | 2 | * linux/include/linux/sunrpc/xprt.h |
3 | * | 3 | * |
4 | * Declarations for the RPC transport interface. | 4 | * Declarations for the RPC transport interface. |
5 | * | 5 | * |
@@ -150,8 +150,8 @@ struct rpc_xprt { | |||
150 | unsigned long cong; /* current congestion */ | 150 | unsigned long cong; /* current congestion */ |
151 | unsigned long cwnd; /* congestion window */ | 151 | unsigned long cwnd; /* congestion window */ |
152 | 152 | ||
153 | unsigned int rcvsize, /* socket receive buffer size */ | 153 | unsigned int rcvsize, /* transport rcv buffer size */ |
154 | sndsize; /* socket send buffer size */ | 154 | sndsize; /* transport send buffer size */ |
155 | 155 | ||
156 | size_t max_payload; /* largest RPC payload size, | 156 | size_t max_payload; /* largest RPC payload size, |
157 | in bytes */ | 157 | in bytes */ |
@@ -184,12 +184,12 @@ struct rpc_xprt { | |||
184 | unsigned long tcp_copied, /* copied to request */ | 184 | unsigned long tcp_copied, /* copied to request */ |
185 | tcp_flags; | 185 | tcp_flags; |
186 | /* | 186 | /* |
187 | * Connection of sockets | 187 | * Connection of transports |
188 | */ | 188 | */ |
189 | struct work_struct sock_connect; | 189 | struct work_struct connect_worker; |
190 | unsigned short port; | 190 | unsigned short port; |
191 | /* | 191 | /* |
192 | * Disconnection of idle sockets | 192 | * Disconnection of idle transports |
193 | */ | 193 | */ |
194 | struct work_struct task_cleanup; | 194 | struct work_struct task_cleanup; |
195 | struct timer_list timer; | 195 | struct timer_list timer; |
@@ -219,27 +219,36 @@ struct rpc_xprt { | |||
219 | 219 | ||
220 | #ifdef __KERNEL__ | 220 | #ifdef __KERNEL__ |
221 | 221 | ||
222 | struct rpc_xprt * xprt_create_proto(int proto, struct sockaddr_in *addr, | 222 | /* |
223 | struct rpc_timeout *toparms); | 223 | * Transport operations used by ULPs |
224 | void xprt_disconnect(struct rpc_xprt *); | 224 | */ |
225 | int xprt_destroy(struct rpc_xprt *); | 225 | struct rpc_xprt * xprt_create_proto(int proto, struct sockaddr_in *addr, struct rpc_timeout *to); |
226 | void xprt_set_timeout(struct rpc_timeout *, unsigned int, | 226 | void xprt_set_timeout(struct rpc_timeout *to, unsigned int retr, unsigned long incr); |
227 | unsigned long); | 227 | |
228 | struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *, u32); | 228 | /* |
229 | void xprt_complete_rqst(struct rpc_xprt *, | 229 | * Generic internal transport functions |
230 | struct rpc_rqst *, int); | 230 | */ |
231 | void xprt_reserve(struct rpc_task *); | 231 | void xprt_connect(struct rpc_task *task); |
232 | int xprt_prepare_transmit(struct rpc_task *); | 232 | void xprt_reserve(struct rpc_task *task); |
233 | void xprt_transmit(struct rpc_task *); | 233 | int xprt_prepare_transmit(struct rpc_task *task); |
234 | void xprt_receive(struct rpc_task *); | 234 | void xprt_transmit(struct rpc_task *task); |
235 | void xprt_wake_pending_tasks(struct rpc_xprt *, int); | ||
236 | int xprt_adjust_timeout(struct rpc_rqst *req); | 235 | int xprt_adjust_timeout(struct rpc_rqst *req); |
237 | void xprt_release(struct rpc_task *); | 236 | void xprt_release(struct rpc_task *task); |
238 | void xprt_connect(struct rpc_task *); | 237 | int xprt_destroy(struct rpc_xprt *xprt); |
239 | int xs_setup_udp(struct rpc_xprt *, | 238 | |
240 | struct rpc_timeout *); | 239 | /* |
241 | int xs_setup_tcp(struct rpc_xprt *, | 240 | * Transport switch helper functions |
242 | struct rpc_timeout *); | 241 | */ |
242 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); | ||
243 | struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, u32 xid); | ||
244 | void xprt_complete_rqst(struct rpc_xprt *xprt, struct rpc_rqst *req, int copied); | ||
245 | void xprt_disconnect(struct rpc_xprt *xprt); | ||
246 | |||
247 | /* | ||
248 | * Socket transport setup operations | ||
249 | */ | ||
250 | int xs_setup_udp(struct rpc_xprt *xprt, struct rpc_timeout *to); | ||
251 | int xs_setup_tcp(struct rpc_xprt *xprt, struct rpc_timeout *to); | ||
243 | 252 | ||
244 | /* | 253 | /* |
245 | * Reserved bit positions in xprt->state | 254 | * Reserved bit positions in xprt->state |