Lines Matching refs:p

65 static int nfs4_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)  in nfs4_decode_void()  argument
67 return xdr_argsize_check(rqstp, p); in nfs4_decode_void()
70 static int nfs4_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) in nfs4_encode_void() argument
72 return xdr_ressize_check(rqstp, p); in nfs4_encode_void()
77 __be32 *p; in read_buf() local
79 p = xdr_inline_decode(xdr, nbytes); in read_buf()
80 if (unlikely(p == NULL)) in read_buf()
82 return p; in read_buf()
87 __be32 *p; in decode_string() local
89 p = read_buf(xdr, 4); in decode_string()
90 if (unlikely(p == NULL)) in decode_string()
92 *len = ntohl(*p); in decode_string()
95 p = read_buf(xdr, *len); in decode_string()
96 if (unlikely(p == NULL)) in decode_string()
98 *str = (const char *)p; in decode_string()
107 __be32 *p; in decode_fh() local
109 p = read_buf(xdr, 4); in decode_fh()
110 if (unlikely(p == NULL)) in decode_fh()
112 fh->size = ntohl(*p); in decode_fh()
115 p = read_buf(xdr, fh->size); in decode_fh()
116 if (unlikely(p == NULL)) in decode_fh()
118 memcpy(&fh->data[0], p, fh->size); in decode_fh()
125 __be32 *p; in decode_bitmap() local
128 p = read_buf(xdr, 4); in decode_bitmap()
129 if (unlikely(p == NULL)) in decode_bitmap()
131 attrlen = ntohl(*p); in decode_bitmap()
132 p = read_buf(xdr, attrlen << 2); in decode_bitmap()
133 if (unlikely(p == NULL)) in decode_bitmap()
136 bitmap[0] = ntohl(*p++); in decode_bitmap()
138 bitmap[1] = ntohl(*p); in decode_bitmap()
144 __be32 *p; in decode_stateid() local
146 p = read_buf(xdr, NFS4_STATEID_SIZE); in decode_stateid()
147 if (unlikely(p == NULL)) in decode_stateid()
149 memcpy(stateid, p, NFS4_STATEID_SIZE); in decode_stateid()
155 __be32 *p; in decode_compound_hdr_arg() local
167 p = read_buf(xdr, 12); in decode_compound_hdr_arg()
168 if (unlikely(p == NULL)) in decode_compound_hdr_arg()
170 hdr->minorversion = ntohl(*p++); in decode_compound_hdr_arg()
173 hdr->cb_ident = ntohl(*p++); /* ignored by v4.1 and v4.2 */ in decode_compound_hdr_arg()
180 hdr->nops = ntohl(*p); in decode_compound_hdr_arg()
188 __be32 *p; in decode_op_hdr() local
189 p = read_buf(xdr, 4); in decode_op_hdr()
190 if (unlikely(p == NULL)) in decode_op_hdr()
192 *op = ntohl(*p); in decode_op_hdr()
211 __be32 *p; in decode_recall_args() local
217 p = read_buf(xdr, 4); in decode_recall_args()
218 if (unlikely(p == NULL)) { in decode_recall_args()
222 args->truncate = ntohl(*p); in decode_recall_args()
235 __be32 *p; in decode_layoutrecall_args() local
239 p = read_buf(xdr, 4 * sizeof(uint32_t)); in decode_layoutrecall_args()
240 if (unlikely(p == NULL)) { in decode_layoutrecall_args()
245 args->cbl_layout_type = ntohl(*p++); in decode_layoutrecall_args()
249 iomode = ntohl(*p++); in decode_layoutrecall_args()
250 args->cbl_layoutchanged = ntohl(*p++); in decode_layoutrecall_args()
251 args->cbl_recall_type = ntohl(*p++); in decode_layoutrecall_args()
259 p = read_buf(xdr, 2 * sizeof(uint64_t)); in decode_layoutrecall_args()
260 if (unlikely(p == NULL)) { in decode_layoutrecall_args()
264 p = xdr_decode_hyper(p, &args->cbl_range.offset); in decode_layoutrecall_args()
265 p = xdr_decode_hyper(p, &args->cbl_range.length); in decode_layoutrecall_args()
270 p = read_buf(xdr, 2 * sizeof(uint64_t)); in decode_layoutrecall_args()
271 if (unlikely(p == NULL)) { in decode_layoutrecall_args()
275 p = xdr_decode_hyper(p, &args->cbl_fsid.major); in decode_layoutrecall_args()
276 p = xdr_decode_hyper(p, &args->cbl_fsid.minor); in decode_layoutrecall_args()
295 __be32 *p; in decode_devicenotify_args() local
302 p = read_buf(xdr, sizeof(uint32_t)); in decode_devicenotify_args()
303 if (unlikely(p == NULL)) { in decode_devicenotify_args()
307 n = ntohl(*p++); in decode_devicenotify_args()
325 p = read_buf(xdr, (4 * sizeof(uint32_t)) + NFS4_DEVICEID4_SIZE); in decode_devicenotify_args()
326 if (unlikely(p == NULL)) { in decode_devicenotify_args()
331 tmp = ntohl(*p++); /* bitmap size */ in decode_devicenotify_args()
336 dev->cbd_notify_type = ntohl(*p++); in decode_devicenotify_args()
343 tmp = ntohl(*p++); /* opaque size */ in decode_devicenotify_args()
351 dev->cbd_layout_type = ntohl(*p++); in decode_devicenotify_args()
352 memcpy(dev->cbd_dev_id.data, p, NFS4_DEVICEID4_SIZE); in decode_devicenotify_args()
353 p += XDR_QUADLEN(NFS4_DEVICEID4_SIZE); in decode_devicenotify_args()
356 p = read_buf(xdr, sizeof(uint32_t)); in decode_devicenotify_args()
357 if (unlikely(p == NULL)) { in decode_devicenotify_args()
361 dev->cbd_immediate = ntohl(*p++); in decode_devicenotify_args()
384 __be32 *p; in decode_sessionid() local
386 p = read_buf(xdr, NFS4_MAX_SESSIONID_LEN); in decode_sessionid()
387 if (unlikely(p == NULL)) in decode_sessionid()
390 memcpy(sid->data, p, NFS4_MAX_SESSIONID_LEN); in decode_sessionid()
397 __be32 *p; in decode_rc_list() local
406 p = read_buf(xdr, sizeof(uint32_t)); in decode_rc_list()
407 if (unlikely(p == NULL)) in decode_rc_list()
410 rc_list->rcl_nrefcalls = ntohl(*p++); in decode_rc_list()
412 p = read_buf(xdr, in decode_rc_list()
414 if (unlikely(p == NULL)) in decode_rc_list()
422 rc_list->rcl_refcalls[i].rc_sequenceid = ntohl(*p++); in decode_rc_list()
423 rc_list->rcl_refcalls[i].rc_slotid = ntohl(*p++); in decode_rc_list()
436 __be32 *p; in decode_cb_sequence_args() local
445 p = read_buf(xdr, 5 * sizeof(uint32_t)); in decode_cb_sequence_args()
446 if (unlikely(p == NULL)) in decode_cb_sequence_args()
450 args->csa_sequenceid = ntohl(*p++); in decode_cb_sequence_args()
451 args->csa_slotid = ntohl(*p++); in decode_cb_sequence_args()
452 args->csa_highestslotid = ntohl(*p++); in decode_cb_sequence_args()
453 args->csa_cachethis = ntohl(*p++); in decode_cb_sequence_args()
454 args->csa_nrclists = ntohl(*p++); in decode_cb_sequence_args()
499 __be32 *p, status; in decode_recallany_args() local
501 p = read_buf(xdr, 4); in decode_recallany_args()
502 if (unlikely(p == NULL)) in decode_recallany_args()
504 args->craa_objs_to_keep = ntohl(*p++); in decode_recallany_args()
517 __be32 *p; in decode_recallslot_args() local
519 p = read_buf(xdr, 4); in decode_recallslot_args()
520 if (unlikely(p == NULL)) in decode_recallslot_args()
522 args->crsa_target_highest_slotid = ntohl(*p++); in decode_recallslot_args()
530 __be32 *p; in encode_string() local
532 p = xdr_reserve_space(xdr, 4 + len); in encode_string()
533 if (unlikely(p == NULL)) in encode_string()
535 xdr_encode_opaque(p, str, len); in encode_string()
544 __be32 *p; in encode_attr_bitmap() local
549 p = xdr_reserve_space(xdr, 16); in encode_attr_bitmap()
550 if (unlikely(p == NULL)) in encode_attr_bitmap()
552 *p++ = htonl(2); in encode_attr_bitmap()
553 *p++ = bm[0]; in encode_attr_bitmap()
554 *p++ = bm[1]; in encode_attr_bitmap()
556 p = xdr_reserve_space(xdr, 12); in encode_attr_bitmap()
557 if (unlikely(p == NULL)) in encode_attr_bitmap()
559 *p++ = htonl(1); in encode_attr_bitmap()
560 *p++ = bm[0]; in encode_attr_bitmap()
562 p = xdr_reserve_space(xdr, 8); in encode_attr_bitmap()
563 if (unlikely(p == NULL)) in encode_attr_bitmap()
565 *p++ = htonl(0); in encode_attr_bitmap()
567 *savep = p; in encode_attr_bitmap()
573 __be32 *p; in encode_attr_change() local
577 p = xdr_reserve_space(xdr, 8); in encode_attr_change()
578 if (unlikely(!p)) in encode_attr_change()
580 p = xdr_encode_hyper(p, change); in encode_attr_change()
586 __be32 *p; in encode_attr_size() local
590 p = xdr_reserve_space(xdr, 8); in encode_attr_size()
591 if (unlikely(!p)) in encode_attr_size()
593 p = xdr_encode_hyper(p, size); in encode_attr_size()
599 __be32 *p; in encode_attr_time() local
601 p = xdr_reserve_space(xdr, 12); in encode_attr_time()
602 if (unlikely(!p)) in encode_attr_time()
604 p = xdr_encode_hyper(p, time->tv_sec); in encode_attr_time()
605 *p = htonl(time->tv_nsec); in encode_attr_time()
641 __be32 *p; in encode_op_hdr() local
643 p = xdr_reserve_space(xdr, 8); in encode_op_hdr()
644 if (unlikely(p == NULL)) in encode_op_hdr()
646 *p++ = htonl(op); in encode_op_hdr()
647 *p = res; in encode_op_hdr()
671 *savep = htonl((unsigned int)((char *)xdr->p - (char *)(savep+1))); in encode_getattr_res()
682 __be32 *p; in encode_sessionid() local
684 p = xdr_reserve_space(xdr, NFS4_MAX_SESSIONID_LEN); in encode_sessionid()
685 if (unlikely(p == NULL)) in encode_sessionid()
688 memcpy(p, sid, NFS4_MAX_SESSIONID_LEN); in encode_sessionid()
696 __be32 *p; in encode_cb_sequence_res() local
706 p = xdr_reserve_space(xdr, 4 * sizeof(uint32_t)); in encode_cb_sequence_res()
707 if (unlikely(p == NULL)) in encode_cb_sequence_res()
710 *p++ = htonl(res->csr_sequenceid); in encode_cb_sequence_res()
711 *p++ = htonl(res->csr_slotid); in encode_cb_sequence_res()
712 *p++ = htonl(res->csr_highestslotid); in encode_cb_sequence_res()
713 *p++ = htonl(res->csr_target_highestslotid); in encode_cb_sequence_res()
866 maxlen = xdr_out->end - xdr_out->p; in process_op()
892 __be32 *p, status; in nfs4_callback_compound() local
905 p = (__be32*)((char *)rqstp->rq_res.head[0].iov_base + rqstp->rq_res.head[0].iov_len); in nfs4_callback_compound()
906 xdr_init_encode(&xdr_out, &rqstp->rq_res, p); in nfs4_callback_compound()