Lines Matching refs:xdr
73 static __be32 *read_buf(struct xdr_stream *xdr, int nbytes) in read_buf() argument
77 p = xdr_inline_decode(xdr, nbytes); in read_buf()
83 static __be32 decode_string(struct xdr_stream *xdr, unsigned int *len, const char **str) in decode_string() argument
87 p = read_buf(xdr, 4); in decode_string()
93 p = read_buf(xdr, *len); in decode_string()
103 static __be32 decode_fh(struct xdr_stream *xdr, struct nfs_fh *fh) in decode_fh() argument
107 p = read_buf(xdr, 4); in decode_fh()
113 p = read_buf(xdr, fh->size); in decode_fh()
121 static __be32 decode_bitmap(struct xdr_stream *xdr, uint32_t *bitmap) in decode_bitmap() argument
126 p = read_buf(xdr, 4); in decode_bitmap()
130 p = read_buf(xdr, attrlen << 2); in decode_bitmap()
140 static __be32 decode_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid) in decode_stateid() argument
144 p = read_buf(xdr, NFS4_STATEID_SIZE); in decode_stateid()
151 static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound_hdr_arg *hdr) in decode_compound_hdr_arg() argument
156 status = decode_string(xdr, &hdr->taglen, &hdr->tag); in decode_compound_hdr_arg()
165 p = read_buf(xdr, 12); in decode_compound_hdr_arg()
184 static __be32 decode_op_hdr(struct xdr_stream *xdr, unsigned int *op) in decode_op_hdr() argument
187 p = read_buf(xdr, 4); in decode_op_hdr()
194 static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, struct cb_getattr… in decode_getattr_args() argument
198 status = decode_fh(xdr, &args->fh); in decode_getattr_args()
202 status = decode_bitmap(xdr, args->bitmap); in decode_getattr_args()
208 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
240 p = read_buf(xdr, 4 * sizeof(uint32_t)); in decode_layoutrecall_args()
256 status = decode_fh(xdr, &args->cbl_fh); in decode_layoutrecall_args()
260 p = read_buf(xdr, 2 * sizeof(uint64_t)); in decode_layoutrecall_args()
267 status = decode_stateid(xdr, &args->cbl_stateid); in decode_layoutrecall_args()
271 p = read_buf(xdr, 2 * sizeof(uint64_t)); in decode_layoutrecall_args()
293 struct xdr_stream *xdr, in decode_devicenotify_args() argument
303 p = read_buf(xdr, sizeof(uint32_t)); in decode_devicenotify_args()
326 p = read_buf(xdr, (4 * sizeof(uint32_t)) + NFS4_DEVICEID4_SIZE); in decode_devicenotify_args()
357 p = read_buf(xdr, sizeof(uint32_t)); in decode_devicenotify_args()
382 static __be32 decode_sessionid(struct xdr_stream *xdr, in decode_sessionid() argument
388 p = read_buf(xdr, len); in decode_sessionid()
396 static __be32 decode_rc_list(struct xdr_stream *xdr, in decode_rc_list() argument
403 status = decode_sessionid(xdr, &rc_list->rcl_sessionid); in decode_rc_list()
408 p = read_buf(xdr, sizeof(uint32_t)); in decode_rc_list()
414 p = read_buf(xdr, in decode_rc_list()
435 struct xdr_stream *xdr, in decode_cb_sequence_args() argument
442 status = decode_sessionid(xdr, &args->csa_sessionid); in decode_cb_sequence_args()
447 p = read_buf(xdr, 5 * sizeof(uint32_t)); in decode_cb_sequence_args()
466 status = decode_rc_list(xdr, &args->csa_rclists[i]); in decode_cb_sequence_args()
497 struct xdr_stream *xdr, in decode_recallany_args() argument
504 p = read_buf(xdr, 4); in decode_recallany_args()
508 status = decode_bitmap(xdr, bitmap); in decode_recallany_args()
517 struct xdr_stream *xdr, in decode_recallslot_args() argument
523 p = read_buf(xdr, 4); in decode_recallslot_args()
532 static __be32 encode_string(struct xdr_stream *xdr, unsigned int len, const char *str) in encode_string() argument
536 p = xdr_reserve_space(xdr, 4 + len); in encode_string()
545 static __be32 encode_attr_bitmap(struct xdr_stream *xdr, const uint32_t *bitmap, __be32 **savep) in encode_attr_bitmap() argument
553 p = xdr_reserve_space(xdr, 16); in encode_attr_bitmap()
560 p = xdr_reserve_space(xdr, 12); in encode_attr_bitmap()
566 p = xdr_reserve_space(xdr, 8); in encode_attr_bitmap()
575 static __be32 encode_attr_change(struct xdr_stream *xdr, const uint32_t *bitmap, uint64_t change) in encode_attr_change() argument
581 p = xdr_reserve_space(xdr, 8); in encode_attr_change()
588 static __be32 encode_attr_size(struct xdr_stream *xdr, const uint32_t *bitmap, uint64_t size) in encode_attr_size() argument
594 p = xdr_reserve_space(xdr, 8); in encode_attr_size()
601 static __be32 encode_attr_time(struct xdr_stream *xdr, const struct timespec *time) in encode_attr_time() argument
605 p = xdr_reserve_space(xdr, 12); in encode_attr_time()
613 static __be32 encode_attr_ctime(struct xdr_stream *xdr, const uint32_t *bitmap, const struct timesp… in encode_attr_ctime() argument
617 return encode_attr_time(xdr,time); in encode_attr_ctime()
620 static __be32 encode_attr_mtime(struct xdr_stream *xdr, const uint32_t *bitmap, const struct timesp… in encode_attr_mtime() argument
624 return encode_attr_time(xdr,time); in encode_attr_mtime()
627 static __be32 encode_compound_hdr_res(struct xdr_stream *xdr, struct cb_compound_hdr_res *hdr) in encode_compound_hdr_res() argument
631 hdr->status = xdr_reserve_space(xdr, 4); in encode_compound_hdr_res()
634 status = encode_string(xdr, hdr->taglen, hdr->tag); in encode_compound_hdr_res()
637 hdr->nops = xdr_reserve_space(xdr, 4); in encode_compound_hdr_res()
643 static __be32 encode_op_hdr(struct xdr_stream *xdr, uint32_t op, __be32 res) in encode_op_hdr() argument
647 p = xdr_reserve_space(xdr, 8); in encode_op_hdr()
655 static __be32 encode_getattr_res(struct svc_rqst *rqstp, struct xdr_stream *xdr, const struct cb_ge… in encode_getattr_res() argument
662 status = encode_attr_bitmap(xdr, res->bitmap, &savep); in encode_getattr_res()
665 status = encode_attr_change(xdr, res->bitmap, res->change_attr); in encode_getattr_res()
668 status = encode_attr_size(xdr, res->bitmap, res->size); in encode_getattr_res()
671 status = encode_attr_ctime(xdr, res->bitmap, &res->ctime); in encode_getattr_res()
674 status = encode_attr_mtime(xdr, res->bitmap, &res->mtime); in encode_getattr_res()
675 *savep = htonl((unsigned int)((char *)xdr->p - (char *)(savep+1))); in encode_getattr_res()
683 static __be32 encode_sessionid(struct xdr_stream *xdr, in encode_sessionid() argument
689 p = xdr_reserve_space(xdr, len); in encode_sessionid()
698 struct xdr_stream *xdr, in encode_cb_sequence_res() argument
707 encode_sessionid(xdr, &res->csr_sessionid); in encode_cb_sequence_res()
709 p = xdr_reserve_space(xdr, 4 * sizeof(uint32_t)); in encode_cb_sequence_res()