Lines Matching refs:xdr
75 static __be32 *read_buf(struct xdr_stream *xdr, int nbytes) in read_buf() argument
79 p = xdr_inline_decode(xdr, nbytes); in read_buf()
85 static __be32 decode_string(struct xdr_stream *xdr, unsigned int *len, const char **str) in decode_string() argument
89 p = read_buf(xdr, 4); in decode_string()
95 p = read_buf(xdr, *len); in decode_string()
105 static __be32 decode_fh(struct xdr_stream *xdr, struct nfs_fh *fh) in decode_fh() argument
109 p = read_buf(xdr, 4); in decode_fh()
115 p = read_buf(xdr, fh->size); in decode_fh()
123 static __be32 decode_bitmap(struct xdr_stream *xdr, uint32_t *bitmap) in decode_bitmap() argument
128 p = read_buf(xdr, 4); in decode_bitmap()
132 p = read_buf(xdr, attrlen << 2); in decode_bitmap()
142 static __be32 decode_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid) in decode_stateid() argument
146 p = read_buf(xdr, NFS4_STATEID_SIZE); in decode_stateid()
153 static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound_hdr_arg *hdr) in decode_compound_hdr_arg() argument
158 status = decode_string(xdr, &hdr->taglen, &hdr->tag); in decode_compound_hdr_arg()
167 p = read_buf(xdr, 12); in decode_compound_hdr_arg()
186 static __be32 decode_op_hdr(struct xdr_stream *xdr, unsigned int *op) in decode_op_hdr() argument
189 p = read_buf(xdr, 4); in decode_op_hdr()
196 static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, struct cb_getattr… in decode_getattr_args() argument
200 status = decode_fh(xdr, &args->fh); in decode_getattr_args()
203 status = decode_bitmap(xdr, args->bitmap); in decode_getattr_args()
209 static __be32 decode_recall_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, struct cb_recallar… in decode_recall_args() argument
214 status = decode_stateid(xdr, &args->stateid); in decode_recall_args()
217 p = read_buf(xdr, 4); in decode_recall_args()
223 status = decode_fh(xdr, &args->fh); in decode_recall_args()
232 struct xdr_stream *xdr, in decode_layoutrecall_args() argument
239 p = read_buf(xdr, 4 * sizeof(uint32_t)); in decode_layoutrecall_args()
255 status = decode_fh(xdr, &args->cbl_fh); in decode_layoutrecall_args()
259 p = read_buf(xdr, 2 * sizeof(uint64_t)); in decode_layoutrecall_args()
266 status = decode_stateid(xdr, &args->cbl_stateid); in decode_layoutrecall_args()
270 p = read_buf(xdr, 2 * sizeof(uint64_t)); in decode_layoutrecall_args()
292 struct xdr_stream *xdr, in decode_devicenotify_args() argument
302 p = read_buf(xdr, sizeof(uint32_t)); in decode_devicenotify_args()
325 p = read_buf(xdr, (4 * sizeof(uint32_t)) + NFS4_DEVICEID4_SIZE); in decode_devicenotify_args()
356 p = read_buf(xdr, sizeof(uint32_t)); in decode_devicenotify_args()
381 static __be32 decode_sessionid(struct xdr_stream *xdr, in decode_sessionid() argument
386 p = read_buf(xdr, NFS4_MAX_SESSIONID_LEN); in decode_sessionid()
394 static __be32 decode_rc_list(struct xdr_stream *xdr, in decode_rc_list() argument
401 status = decode_sessionid(xdr, &rc_list->rcl_sessionid); in decode_rc_list()
406 p = read_buf(xdr, sizeof(uint32_t)); in decode_rc_list()
412 p = read_buf(xdr, in decode_rc_list()
433 struct xdr_stream *xdr, in decode_cb_sequence_args() argument
440 status = decode_sessionid(xdr, &args->csa_sessionid); in decode_cb_sequence_args()
445 p = read_buf(xdr, 5 * sizeof(uint32_t)); in decode_cb_sequence_args()
464 status = decode_rc_list(xdr, &args->csa_rclists[i]); in decode_cb_sequence_args()
495 struct xdr_stream *xdr, in decode_recallany_args() argument
501 p = read_buf(xdr, 4); in decode_recallany_args()
505 status = decode_bitmap(xdr, bitmap); in decode_recallany_args()
514 struct xdr_stream *xdr, in decode_recallslot_args() argument
519 p = read_buf(xdr, 4); in decode_recallslot_args()
528 static __be32 encode_string(struct xdr_stream *xdr, unsigned int len, const char *str) in encode_string() argument
532 p = xdr_reserve_space(xdr, 4 + len); in encode_string()
541 static __be32 encode_attr_bitmap(struct xdr_stream *xdr, const uint32_t *bitmap, __be32 **savep) in encode_attr_bitmap() argument
549 p = xdr_reserve_space(xdr, 16); in encode_attr_bitmap()
556 p = xdr_reserve_space(xdr, 12); in encode_attr_bitmap()
562 p = xdr_reserve_space(xdr, 8); in encode_attr_bitmap()
571 static __be32 encode_attr_change(struct xdr_stream *xdr, const uint32_t *bitmap, uint64_t change) in encode_attr_change() argument
577 p = xdr_reserve_space(xdr, 8); in encode_attr_change()
584 static __be32 encode_attr_size(struct xdr_stream *xdr, const uint32_t *bitmap, uint64_t size) in encode_attr_size() argument
590 p = xdr_reserve_space(xdr, 8); in encode_attr_size()
597 static __be32 encode_attr_time(struct xdr_stream *xdr, const struct timespec *time) in encode_attr_time() argument
601 p = xdr_reserve_space(xdr, 12); in encode_attr_time()
609 static __be32 encode_attr_ctime(struct xdr_stream *xdr, const uint32_t *bitmap, const struct timesp… in encode_attr_ctime() argument
613 return encode_attr_time(xdr,time); in encode_attr_ctime()
616 static __be32 encode_attr_mtime(struct xdr_stream *xdr, const uint32_t *bitmap, const struct timesp… in encode_attr_mtime() argument
620 return encode_attr_time(xdr,time); in encode_attr_mtime()
623 static __be32 encode_compound_hdr_res(struct xdr_stream *xdr, struct cb_compound_hdr_res *hdr) in encode_compound_hdr_res() argument
627 hdr->status = xdr_reserve_space(xdr, 4); in encode_compound_hdr_res()
630 status = encode_string(xdr, hdr->taglen, hdr->tag); in encode_compound_hdr_res()
633 hdr->nops = xdr_reserve_space(xdr, 4); in encode_compound_hdr_res()
639 static __be32 encode_op_hdr(struct xdr_stream *xdr, uint32_t op, __be32 res) in encode_op_hdr() argument
643 p = xdr_reserve_space(xdr, 8); in encode_op_hdr()
651 static __be32 encode_getattr_res(struct svc_rqst *rqstp, struct xdr_stream *xdr, const struct cb_ge… in encode_getattr_res() argument
658 status = encode_attr_bitmap(xdr, res->bitmap, &savep); in encode_getattr_res()
661 status = encode_attr_change(xdr, res->bitmap, res->change_attr); in encode_getattr_res()
664 status = encode_attr_size(xdr, res->bitmap, res->size); in encode_getattr_res()
667 status = encode_attr_ctime(xdr, res->bitmap, &res->ctime); in encode_getattr_res()
670 status = encode_attr_mtime(xdr, res->bitmap, &res->mtime); in encode_getattr_res()
671 *savep = htonl((unsigned int)((char *)xdr->p - (char *)(savep+1))); in encode_getattr_res()
679 static __be32 encode_sessionid(struct xdr_stream *xdr, in encode_sessionid() argument
684 p = xdr_reserve_space(xdr, NFS4_MAX_SESSIONID_LEN); in encode_sessionid()
693 struct xdr_stream *xdr, in encode_cb_sequence_res() argument
702 status = encode_sessionid(xdr, &res->csr_sessionid); in encode_cb_sequence_res()
706 p = xdr_reserve_space(xdr, 4 * sizeof(uint32_t)); in encode_cb_sequence_res()