diff options
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/clnt.h | 6 | ||||
-rw-r--r-- | include/linux/sunrpc/sched.h | 1 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 14 | ||||
-rw-r--r-- | include/linux/sunrpc/xdr.h | 21 |
4 files changed, 38 insertions, 4 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 2709caf4d128..ab151bbb66df 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -111,6 +111,11 @@ struct rpc_procinfo { | |||
111 | struct rpc_clnt *rpc_create_client(struct rpc_xprt *xprt, char *servname, | 111 | struct rpc_clnt *rpc_create_client(struct rpc_xprt *xprt, char *servname, |
112 | struct rpc_program *info, | 112 | struct rpc_program *info, |
113 | u32 version, rpc_authflavor_t authflavor); | 113 | u32 version, rpc_authflavor_t authflavor); |
114 | struct rpc_clnt *rpc_new_client(struct rpc_xprt *xprt, char *servname, | ||
115 | struct rpc_program *info, | ||
116 | u32 version, rpc_authflavor_t authflavor); | ||
117 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | ||
118 | struct rpc_program *, int); | ||
114 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); | 119 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); |
115 | int rpc_shutdown_client(struct rpc_clnt *); | 120 | int rpc_shutdown_client(struct rpc_clnt *); |
116 | int rpc_destroy_client(struct rpc_clnt *); | 121 | int rpc_destroy_client(struct rpc_clnt *); |
@@ -129,6 +134,7 @@ void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset); | |||
129 | void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); | 134 | void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); |
130 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); | 135 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); |
131 | size_t rpc_max_payload(struct rpc_clnt *); | 136 | size_t rpc_max_payload(struct rpc_clnt *); |
137 | int rpc_ping(struct rpc_clnt *clnt, int flags); | ||
132 | 138 | ||
133 | static __inline__ | 139 | static __inline__ |
134 | int rpc_call(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags) | 140 | int rpc_call(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags) |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 99d17ed7cebb..4d77e90d0b30 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -31,7 +31,6 @@ struct rpc_wait_queue; | |||
31 | struct rpc_wait { | 31 | struct rpc_wait { |
32 | struct list_head list; /* wait queue links */ | 32 | struct list_head list; /* wait queue links */ |
33 | struct list_head links; /* Links to related tasks */ | 33 | struct list_head links; /* Links to related tasks */ |
34 | wait_queue_head_t waitq; /* sync: sleep on this q */ | ||
35 | struct rpc_wait_queue * rpc_waitq; /* RPC wait queue we're on */ | 34 | struct rpc_wait_queue * rpc_waitq; /* RPC wait queue we're on */ |
36 | }; | 35 | }; |
37 | 36 | ||
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 37003970cf2e..5af8800e0ce3 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -185,6 +185,17 @@ xdr_ressize_check(struct svc_rqst *rqstp, u32 *p) | |||
185 | return vec->iov_len <= PAGE_SIZE; | 185 | return vec->iov_len <= PAGE_SIZE; |
186 | } | 186 | } |
187 | 187 | ||
188 | static inline struct page * | ||
189 | svc_take_res_page(struct svc_rqst *rqstp) | ||
190 | { | ||
191 | if (rqstp->rq_arghi <= rqstp->rq_argused) | ||
192 | return NULL; | ||
193 | rqstp->rq_arghi--; | ||
194 | rqstp->rq_respages[rqstp->rq_resused] = | ||
195 | rqstp->rq_argpages[rqstp->rq_arghi]; | ||
196 | return rqstp->rq_respages[rqstp->rq_resused++]; | ||
197 | } | ||
198 | |||
188 | static inline int svc_take_page(struct svc_rqst *rqstp) | 199 | static inline int svc_take_page(struct svc_rqst *rqstp) |
189 | { | 200 | { |
190 | if (rqstp->rq_arghi <= rqstp->rq_argused) | 201 | if (rqstp->rq_arghi <= rqstp->rq_argused) |
@@ -240,9 +251,10 @@ struct svc_deferred_req { | |||
240 | }; | 251 | }; |
241 | 252 | ||
242 | /* | 253 | /* |
243 | * RPC program | 254 | * List of RPC programs on the same transport endpoint |
244 | */ | 255 | */ |
245 | struct svc_program { | 256 | struct svc_program { |
257 | struct svc_program * pg_next; /* other programs (same xprt) */ | ||
246 | u32 pg_prog; /* program number */ | 258 | u32 pg_prog; /* program number */ |
247 | unsigned int pg_lovers; /* lowest version */ | 259 | unsigned int pg_lovers; /* lowest version */ |
248 | unsigned int pg_hivers; /* lowest version */ | 260 | unsigned int pg_hivers; /* lowest version */ |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 541dcf838abf..34ec3e8d99b3 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -146,7 +146,8 @@ extern void xdr_shift_buf(struct xdr_buf *, size_t); | |||
146 | extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *); | 146 | extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *); |
147 | extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, int, int); | 147 | extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, int, int); |
148 | extern int xdr_buf_read_netobj(struct xdr_buf *, struct xdr_netobj *, int); | 148 | extern int xdr_buf_read_netobj(struct xdr_buf *, struct xdr_netobj *, int); |
149 | extern int read_bytes_from_xdr_buf(struct xdr_buf *buf, int base, void *obj, int len); | 149 | extern int read_bytes_from_xdr_buf(struct xdr_buf *, int, void *, int); |
150 | extern int write_bytes_to_xdr_buf(struct xdr_buf *, int, void *, int); | ||
150 | 151 | ||
151 | /* | 152 | /* |
152 | * Helper structure for copying from an sk_buff. | 153 | * Helper structure for copying from an sk_buff. |
@@ -160,7 +161,7 @@ typedef struct { | |||
160 | 161 | ||
161 | typedef size_t (*skb_read_actor_t)(skb_reader_t *desc, void *to, size_t len); | 162 | typedef size_t (*skb_read_actor_t)(skb_reader_t *desc, void *to, size_t len); |
162 | 163 | ||
163 | extern void xdr_partial_copy_from_skb(struct xdr_buf *, unsigned int, | 164 | extern ssize_t xdr_partial_copy_from_skb(struct xdr_buf *, unsigned int, |
164 | skb_reader_t *, skb_read_actor_t); | 165 | skb_reader_t *, skb_read_actor_t); |
165 | 166 | ||
166 | struct socket; | 167 | struct socket; |
@@ -168,6 +169,22 @@ struct sockaddr; | |||
168 | extern int xdr_sendpages(struct socket *, struct sockaddr *, int, | 169 | extern int xdr_sendpages(struct socket *, struct sockaddr *, int, |
169 | struct xdr_buf *, unsigned int, int); | 170 | struct xdr_buf *, unsigned int, int); |
170 | 171 | ||
172 | extern int xdr_encode_word(struct xdr_buf *, int, u32); | ||
173 | extern int xdr_decode_word(struct xdr_buf *, int, u32 *); | ||
174 | |||
175 | struct xdr_array2_desc; | ||
176 | typedef int (*xdr_xcode_elem_t)(struct xdr_array2_desc *desc, void *elem); | ||
177 | struct xdr_array2_desc { | ||
178 | unsigned int elem_size; | ||
179 | unsigned int array_len; | ||
180 | xdr_xcode_elem_t xcode; | ||
181 | }; | ||
182 | |||
183 | extern int xdr_decode_array2(struct xdr_buf *buf, unsigned int base, | ||
184 | struct xdr_array2_desc *desc); | ||
185 | extern int xdr_encode_array2(struct xdr_buf *buf, unsigned int base, | ||
186 | struct xdr_array2_desc *desc); | ||
187 | |||
171 | /* | 188 | /* |
172 | * Provide some simple tools for XDR buffer overflow-checking etc. | 189 | * Provide some simple tools for XDR buffer overflow-checking etc. |
173 | */ | 190 | */ |