diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2010-12-14 09:59:29 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-12-16 12:37:25 -0500 |
commit | bf2695516db982e90a22fc94f93491b481796bb1 (patch) | |
tree | 367bf134ef892bfc3fcd2c4fe676b14102d97467 /include/linux/sunrpc | |
parent | 9f06c719f474be7003763284a990bed6377bb0d4 (diff) |
SUNRPC: New xdr_streams XDR decoder API
Now that all client-side XDR decoder routines use xdr_streams, there
should be no need to support the legacy calling sequence [rpc_rqst *,
__be32 *, RPC res *] anywhere. We can construct an xdr_stream in the
generic RPC code, instead of in each decoder function.
This is a refactoring change. It should not cause different behavior.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/auth.h | 4 | ||||
-rw-r--r-- | include/linux/sunrpc/clnt.h | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/xdr.h | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index d88cffbaa6df..8521067ed4f7 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -112,7 +112,7 @@ struct rpc_credops { | |||
112 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); | 112 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); |
113 | int (*crwrap_req)(struct rpc_task *, kxdreproc_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 | ||
@@ -140,7 +140,7 @@ 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, kxdreproc_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/clnt.h b/include/linux/sunrpc/clnt.h index 7b19c4e1ce53..ef9476a36ff7 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -90,7 +90,7 @@ struct rpc_version { | |||
90 | struct rpc_procinfo { | 90 | struct rpc_procinfo { |
91 | u32 p_proc; /* RPC procedure number */ | 91 | u32 p_proc; /* RPC procedure number */ |
92 | kxdreproc_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/xdr.h b/include/linux/sunrpc/xdr.h index a21cf5378c1d..9a21e8102c42 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -204,9 +204,10 @@ struct xdr_stream { | |||
204 | }; | 204 | }; |
205 | 205 | ||
206 | /* | 206 | /* |
207 | * This is the xdr_stream style generic XDR function. | 207 | * These are the xdr_stream style generic XDR encode and decode functions. |
208 | */ | 208 | */ |
209 | typedef void (*kxdreproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); | 209 | typedef void (*kxdreproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); |
210 | typedef int (*kxdrdproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); | ||
210 | 211 | ||
211 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 212 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
212 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); | 213 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); |