Lines Matching refs:xdr

3  * linux/fs/lockd/xdr.c
14 #include <linux/sunrpc/xdr.h>
51 svcxdr_decode_fhandle(struct xdr_stream *xdr, struct nfs_fh *fh)
56 if (xdr_stream_decode_u32(xdr, &len) < 0)
61 p = xdr_inline_decode(xdr, len);
72 svcxdr_decode_lock(struct xdr_stream *xdr, struct nlm_lock *lock)
77 if (!svcxdr_decode_string(xdr, &lock->caller, &lock->len))
79 if (!svcxdr_decode_fhandle(xdr, &lock->fh))
81 if (!svcxdr_decode_owner(xdr, &lock->oh))
83 if (xdr_stream_decode_u32(xdr, &lock->svid) < 0)
85 if (xdr_stream_decode_u32(xdr, &start) < 0)
87 if (xdr_stream_decode_u32(xdr, &len) < 0)
104 svcxdr_encode_holder(struct xdr_stream *xdr, const struct nlm_lock *lock)
110 if (xdr_stream_encode_bool(xdr, fl->c.flc_type != F_RDLCK) < 0)
112 if (xdr_stream_encode_u32(xdr, lock->svid) < 0)
114 if (!svcxdr_encode_owner(xdr, &lock->oh))
121 if (xdr_stream_encode_u32(xdr, start) < 0)
123 if (xdr_stream_encode_u32(xdr, len) < 0)
130 svcxdr_encode_testrply(struct xdr_stream *xdr, const struct nlm_res *resp)
132 if (!svcxdr_encode_stats(xdr, resp->status))
136 if (!svcxdr_encode_holder(xdr, &resp->lock))
149 nlmsvc_decode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr)
155 nlmsvc_decode_testargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
160 if (!svcxdr_decode_cookie(xdr, &argp->cookie))
162 if (xdr_stream_decode_bool(xdr, &exclusive) < 0)
164 if (!svcxdr_decode_lock(xdr, &argp->lock))
173 nlmsvc_decode_lockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
178 if (!svcxdr_decode_cookie(xdr, &argp->cookie))
180 if (xdr_stream_decode_bool(xdr, &argp->block) < 0)
182 if (xdr_stream_decode_bool(xdr, &exclusive) < 0)
184 if (!svcxdr_decode_lock(xdr, &argp->lock))
188 if (xdr_stream_decode_bool(xdr, &argp->reclaim) < 0)
190 if (xdr_stream_decode_u32(xdr, &argp->state) < 0)
198 nlmsvc_decode_cancargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
203 if (!svcxdr_decode_cookie(xdr, &argp->cookie))
205 if (xdr_stream_decode_bool(xdr, &argp->block) < 0)
207 if (xdr_stream_decode_bool(xdr, &exclusive) < 0)
209 if (!svcxdr_decode_lock(xdr, &argp->lock))
218 nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
222 if (!svcxdr_decode_cookie(xdr, &argp->cookie))
224 if (!svcxdr_decode_lock(xdr, &argp->lock))
232 nlmsvc_decode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr)
236 if (!svcxdr_decode_cookie(xdr, &resp->cookie))
238 if (!svcxdr_decode_stats(xdr, &resp->status))
245 nlmsvc_decode_reboot(struct svc_rqst *rqstp, struct xdr_stream *xdr)
251 if (xdr_stream_decode_u32(xdr, &len) < 0)
255 p = xdr_inline_decode(xdr, len);
260 if (xdr_stream_decode_u32(xdr, &argp->state) < 0)
262 p = xdr_inline_decode(xdr, SM_PRIV_SIZE);
271 nlmsvc_decode_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
280 if (!svcxdr_decode_cookie(xdr, &argp->cookie))
282 if (!svcxdr_decode_string(xdr, &lock->caller, &lock->len))
284 if (!svcxdr_decode_fhandle(xdr, &lock->fh))
286 if (!svcxdr_decode_owner(xdr, &lock->oh))
289 if (xdr_stream_decode_u32(xdr, &argp->fsm_mode) < 0)
291 if (xdr_stream_decode_u32(xdr, &argp->fsm_access) < 0)
298 nlmsvc_decode_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr)
303 if (!svcxdr_decode_string(xdr, &lock->caller, &lock->len))
305 if (xdr_stream_decode_u32(xdr, &argp->state) < 0)
317 nlmsvc_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr)
323 nlmsvc_encode_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr)
327 return svcxdr_encode_cookie(xdr, &resp->cookie) &&
328 svcxdr_encode_testrply(xdr, resp);
332 nlmsvc_encode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr)
336 return svcxdr_encode_cookie(xdr, &resp->cookie) &&
337 svcxdr_encode_stats(xdr, resp->status);
341 nlmsvc_encode_shareres(struct svc_rqst *rqstp, struct xdr_stream *xdr)
345 if (!svcxdr_encode_cookie(xdr, &resp->cookie))
347 if (!svcxdr_encode_stats(xdr, resp->status))
350 if (xdr_stream_encode_u32(xdr, 0) < 0)