Lines Matching refs:xdr

15 #include <linux/sunrpc/xdr.h>
53 svcxdr_decode_fhandle(struct xdr_stream *xdr, struct nfs_fh *fh)
58 if (xdr_stream_decode_u32(xdr, &len) < 0)
63 p = xdr_inline_decode(xdr, len);
74 svcxdr_decode_lock(struct xdr_stream *xdr, struct nlm_lock *lock)
78 if (!svcxdr_decode_string(xdr, &lock->caller, &lock->len))
80 if (!svcxdr_decode_fhandle(xdr, &lock->fh))
82 if (!svcxdr_decode_owner(xdr, &lock->oh))
84 if (xdr_stream_decode_u32(xdr, &lock->svid) < 0)
86 if (xdr_stream_decode_u64(xdr, &lock->lock_start) < 0)
88 if (xdr_stream_decode_u64(xdr, &lock->lock_len) < 0)
99 svcxdr_encode_holder(struct xdr_stream *xdr, const struct nlm_lock *lock)
105 if (xdr_stream_encode_bool(xdr, fl->c.flc_type != F_RDLCK) < 0)
107 if (xdr_stream_encode_u32(xdr, lock->svid) < 0)
109 if (!svcxdr_encode_owner(xdr, &lock->oh))
116 if (xdr_stream_encode_u64(xdr, start) < 0)
118 if (xdr_stream_encode_u64(xdr, len) < 0)
125 svcxdr_encode_testrply(struct xdr_stream *xdr, const struct nlm_res *resp)
127 if (!svcxdr_encode_stats(xdr, resp->status))
131 if (!svcxdr_encode_holder(xdr, &resp->lock))
144 nlm4svc_decode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr)
150 nlm4svc_decode_testargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
155 if (!svcxdr_decode_cookie(xdr, &argp->cookie))
157 if (xdr_stream_decode_bool(xdr, &exclusive) < 0)
159 if (!svcxdr_decode_lock(xdr, &argp->lock))
168 nlm4svc_decode_lockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
173 if (!svcxdr_decode_cookie(xdr, &argp->cookie))
175 if (xdr_stream_decode_bool(xdr, &argp->block) < 0)
177 if (xdr_stream_decode_bool(xdr, &exclusive) < 0)
179 if (!svcxdr_decode_lock(xdr, &argp->lock))
183 if (xdr_stream_decode_bool(xdr, &argp->reclaim) < 0)
185 if (xdr_stream_decode_u32(xdr, &argp->state) < 0)
193 nlm4svc_decode_cancargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
198 if (!svcxdr_decode_cookie(xdr, &argp->cookie))
200 if (xdr_stream_decode_bool(xdr, &argp->block) < 0)
202 if (xdr_stream_decode_bool(xdr, &exclusive) < 0)
204 if (!svcxdr_decode_lock(xdr, &argp->lock))
213 nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
217 if (!svcxdr_decode_cookie(xdr, &argp->cookie))
219 if (!svcxdr_decode_lock(xdr, &argp->lock))
227 nlm4svc_decode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr)
231 if (!svcxdr_decode_cookie(xdr, &resp->cookie))
233 if (!svcxdr_decode_stats(xdr, &resp->status))
240 nlm4svc_decode_reboot(struct svc_rqst *rqstp, struct xdr_stream *xdr)
246 if (xdr_stream_decode_u32(xdr, &len) < 0)
250 p = xdr_inline_decode(xdr, len);
255 if (xdr_stream_decode_u32(xdr, &argp->state) < 0)
257 p = xdr_inline_decode(xdr, SM_PRIV_SIZE);
266 nlm4svc_decode_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
275 if (!svcxdr_decode_cookie(xdr, &argp->cookie))
277 if (!svcxdr_decode_string(xdr, &lock->caller, &lock->len))
279 if (!svcxdr_decode_fhandle(xdr, &lock->fh))
281 if (!svcxdr_decode_owner(xdr, &lock->oh))
284 if (xdr_stream_decode_u32(xdr, &argp->fsm_mode) < 0)
286 if (xdr_stream_decode_u32(xdr, &argp->fsm_access) < 0)
293 nlm4svc_decode_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr)
298 if (!svcxdr_decode_string(xdr, &lock->caller, &lock->len))
300 if (xdr_stream_decode_u32(xdr, &argp->state) < 0)
312 nlm4svc_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr)
318 nlm4svc_encode_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr)
322 return svcxdr_encode_cookie(xdr, &resp->cookie) &&
323 svcxdr_encode_testrply(xdr, resp);
327 nlm4svc_encode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr)
331 return svcxdr_encode_cookie(xdr, &resp->cookie) &&
332 svcxdr_encode_stats(xdr, resp->status);
336 nlm4svc_encode_shareres(struct svc_rqst *rqstp, struct xdr_stream *xdr)
340 if (!svcxdr_encode_cookie(xdr, &resp->cookie))
342 if (!svcxdr_encode_stats(xdr, resp->status))
345 if (xdr_stream_encode_u32(xdr, 0) < 0)