diff options
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/auth.h | 8 | ||||
| -rw-r--r-- | include/linux/sunrpc/bc_xprt.h | 15 | ||||
| -rw-r--r-- | include/linux/sunrpc/cache.h | 1 | ||||
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 4 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_xprt.h | 1 | ||||
| -rw-r--r-- | include/linux/sunrpc/xdr.h | 14 |
7 files changed, 34 insertions, 11 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index b2024757edd5..8521067ed4f7 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
| @@ -110,9 +110,9 @@ struct rpc_credops { | |||
| 110 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); | 110 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); |
| 111 | int (*crrefresh)(struct rpc_task *); | 111 | int (*crrefresh)(struct rpc_task *); |
| 112 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); | 112 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); |
| 113 | int (*crwrap_req)(struct rpc_task *, kxdrproc_t, | 113 | int (*crwrap_req)(struct rpc_task *, kxdreproc_t, |
| 114 | void *, __be32 *, void *); | 114 | void *, __be32 *, void *); |
| 115 | int (*crunwrap_resp)(struct rpc_task *, kxdrproc_t, | 115 | int (*crunwrap_resp)(struct rpc_task *, kxdrdproc_t, |
| 116 | void *, __be32 *, void *); | 116 | void *, __be32 *, void *); |
| 117 | }; | 117 | }; |
| 118 | 118 | ||
| @@ -139,8 +139,8 @@ struct rpc_cred * rpcauth_generic_bind_cred(struct rpc_task *, struct rpc_cred * | |||
| 139 | void put_rpccred(struct rpc_cred *); | 139 | void put_rpccred(struct rpc_cred *); |
| 140 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); | 140 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); |
| 141 | __be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); | 141 | __be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); |
| 142 | int rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, __be32 *data, void *obj); | 142 | int rpcauth_wrap_req(struct rpc_task *task, kxdreproc_t encode, void *rqstp, __be32 *data, void *obj); |
| 143 | int rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, __be32 *data, void *obj); | 143 | int rpcauth_unwrap_resp(struct rpc_task *task, kxdrdproc_t decode, void *rqstp, __be32 *data, void *obj); |
| 144 | int rpcauth_refreshcred(struct rpc_task *); | 144 | int rpcauth_refreshcred(struct rpc_task *); |
| 145 | void rpcauth_invalcred(struct rpc_task *); | 145 | void rpcauth_invalcred(struct rpc_task *); |
| 146 | int rpcauth_uptodatecred(struct rpc_task *); | 146 | int rpcauth_uptodatecred(struct rpc_task *); |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index 7c91260c44a9..c50b458b8a3f 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
| @@ -43,10 +43,18 @@ int bc_send(struct rpc_rqst *req); | |||
| 43 | */ | 43 | */ |
| 44 | static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | 44 | static inline int svc_is_backchannel(const struct svc_rqst *rqstp) |
| 45 | { | 45 | { |
| 46 | if (rqstp->rq_server->bc_xprt) | 46 | if (rqstp->rq_server->sv_bc_xprt) |
| 47 | return 1; | 47 | return 1; |
| 48 | return 0; | 48 | return 0; |
| 49 | } | 49 | } |
| 50 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
| 51 | { | ||
| 52 | if (svc_is_backchannel(rqstp)) | ||
| 53 | return (struct nfs4_sessionid *) | ||
| 54 | rqstp->rq_server->sv_bc_xprt->xpt_bc_sid; | ||
| 55 | return NULL; | ||
| 56 | } | ||
| 57 | |||
| 50 | #else /* CONFIG_NFS_V4_1 */ | 58 | #else /* CONFIG_NFS_V4_1 */ |
| 51 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, | 59 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, |
| 52 | unsigned int min_reqs) | 60 | unsigned int min_reqs) |
| @@ -59,6 +67,11 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
| 59 | return 0; | 67 | return 0; |
| 60 | } | 68 | } |
| 61 | 69 | ||
| 70 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
| 71 | { | ||
| 72 | return NULL; | ||
| 73 | } | ||
| 74 | |||
| 62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | 75 | static inline void xprt_free_bc_request(struct rpc_rqst *req) |
| 63 | { | 76 | { |
| 64 | } | 77 | } |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 6950c981882d..78aa104250b7 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #ifndef _LINUX_SUNRPC_CACHE_H_ | 13 | #ifndef _LINUX_SUNRPC_CACHE_H_ |
| 14 | #define _LINUX_SUNRPC_CACHE_H_ | 14 | #define _LINUX_SUNRPC_CACHE_H_ |
| 15 | 15 | ||
| 16 | #include <linux/kref.h> | ||
| 16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
| 17 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
| 18 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index a5a55f284b7d..ef9476a36ff7 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -89,8 +89,8 @@ struct rpc_version { | |||
| 89 | */ | 89 | */ |
| 90 | struct rpc_procinfo { | 90 | struct rpc_procinfo { |
| 91 | u32 p_proc; /* RPC procedure number */ | 91 | u32 p_proc; /* RPC procedure number */ |
| 92 | kxdrproc_t p_encode; /* XDR encode function */ | 92 | kxdreproc_t p_encode; /* XDR encode function */ |
| 93 | kxdrproc_t p_decode; /* XDR decode function */ | 93 | kxdrdproc_t p_decode; /* XDR decode function */ |
| 94 | unsigned int p_arglen; /* argument hdr length (u32) */ | 94 | unsigned int p_arglen; /* argument hdr length (u32) */ |
| 95 | unsigned int p_replen; /* reply hdr length (u32) */ | 95 | unsigned int p_replen; /* reply hdr length (u32) */ |
| 96 | unsigned int p_count; /* call count */ | 96 | unsigned int p_count; /* call count */ |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 5a3085b9b394..c81d4d8be3a9 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
| @@ -99,7 +99,7 @@ struct svc_serv { | |||
| 99 | spinlock_t sv_cb_lock; /* protects the svc_cb_list */ | 99 | spinlock_t sv_cb_lock; /* protects the svc_cb_list */ |
| 100 | wait_queue_head_t sv_cb_waitq; /* sleep here if there are no | 100 | wait_queue_head_t sv_cb_waitq; /* sleep here if there are no |
| 101 | * entries in the svc_cb_list */ | 101 | * entries in the svc_cb_list */ |
| 102 | struct svc_xprt *bc_xprt; | 102 | struct svc_xprt *sv_bc_xprt; /* callback on fore channel */ |
| 103 | #endif /* CONFIG_NFS_V4_1 */ | 103 | #endif /* CONFIG_NFS_V4_1 */ |
| 104 | }; | 104 | }; |
| 105 | 105 | ||
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index aea0d438e3c7..357da5e0daa3 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -78,6 +78,7 @@ struct svc_xprt { | |||
| 78 | size_t xpt_remotelen; /* length of address */ | 78 | size_t xpt_remotelen; /* length of address */ |
| 79 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ | 79 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ |
| 80 | struct list_head xpt_users; /* callbacks on free */ | 80 | struct list_head xpt_users; /* callbacks on free */ |
| 81 | void *xpt_bc_sid; /* back channel session ID */ | ||
| 81 | 82 | ||
| 82 | struct net *xpt_net; | 83 | struct net *xpt_net; |
| 83 | }; | 84 | }; |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 498ab93a81e4..fc84b7a19ca3 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
| @@ -33,8 +33,8 @@ struct xdr_netobj { | |||
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | /* | 35 | /* |
| 36 | * This is the generic XDR function. rqstp is either a rpc_rqst (client | 36 | * This is the legacy generic XDR function. rqstp is either a rpc_rqst |
| 37 | * side) or svc_rqst pointer (server side). | 37 | * (client side) or svc_rqst pointer (server side). |
| 38 | * Encode functions always assume there's enough room in the buffer. | 38 | * Encode functions always assume there's enough room in the buffer. |
| 39 | */ | 39 | */ |
| 40 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); | 40 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); |
| @@ -201,14 +201,22 @@ struct xdr_stream { | |||
| 201 | 201 | ||
| 202 | __be32 *end; /* end of available buffer space */ | 202 | __be32 *end; /* end of available buffer space */ |
| 203 | struct kvec *iov; /* pointer to the current kvec */ | 203 | struct kvec *iov; /* pointer to the current kvec */ |
| 204 | struct kvec scratch; /* Scratch buffer */ | ||
| 205 | struct page **page_ptr; /* pointer to the current page */ | ||
| 204 | }; | 206 | }; |
| 205 | 207 | ||
| 208 | /* | ||
| 209 | * These are the xdr_stream style generic XDR encode and decode functions. | ||
| 210 | */ | ||
| 211 | typedef void (*kxdreproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); | ||
| 212 | typedef int (*kxdrdproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); | ||
| 213 | |||
| 206 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 214 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
| 207 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); | 215 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); |
| 208 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, | 216 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, |
| 209 | unsigned int base, unsigned int len); | 217 | unsigned int base, unsigned int len); |
| 210 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 218 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
| 211 | extern __be32 *xdr_inline_peek(struct xdr_stream *xdr, size_t nbytes); | 219 | extern void xdr_set_scratch_buffer(struct xdr_stream *xdr, void *buf, size_t buflen); |
| 212 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); | 220 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); |
| 213 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); | 221 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); |
| 214 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); | 222 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); |
