• Home
  • Raw
  • Download

Lines Matching full:p

29 decode_fh(__be32 *p, struct svc_fh *fhp)  in decode_fh()  argument
32 memcpy(&fhp->fh_handle.fh_base, p, NFS_FHSIZE); in decode_fh()
37 return p + (NFS_FHSIZE >> 2); in decode_fh()
41 __be32 *nfs2svc_decode_fh(__be32 *p, struct svc_fh *fhp) in nfs2svc_decode_fh() argument
43 return decode_fh(p, fhp); in nfs2svc_decode_fh()
47 encode_fh(__be32 *p, struct svc_fh *fhp) in encode_fh() argument
49 memcpy(p, &fhp->fh_handle.fh_base, NFS_FHSIZE); in encode_fh()
50 return p + (NFS_FHSIZE>> 2); in encode_fh()
58 decode_filename(__be32 *p, char **namp, unsigned int *lenp) in decode_filename() argument
63 if ((p = xdr_decode_string_inplace(p, namp, lenp, NFS_MAXNAMLEN)) != NULL) { in decode_filename()
70 return p; in decode_filename()
74 decode_sattr(__be32 *p, struct iattr *iap, struct user_namespace *userns) in decode_sattr() argument
84 if ((tmp = ntohl(*p++)) != (u32)-1 && tmp != 0xffff) { in decode_sattr()
88 if ((tmp = ntohl(*p++)) != (u32)-1) { in decode_sattr()
93 if ((tmp = ntohl(*p++)) != (u32)-1) { in decode_sattr()
98 if ((tmp = ntohl(*p++)) != (u32)-1) { in decode_sattr()
102 tmp = ntohl(*p++); tmp1 = ntohl(*p++); in decode_sattr()
108 tmp = ntohl(*p++); tmp1 = ntohl(*p++); in decode_sattr()
125 return p; in decode_sattr()
129 encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp, in encode_fattr() argument
140 *p++ = htonl(nfs_ftypes[type >> 12]); in encode_fattr()
141 *p++ = htonl((u32) stat->mode); in encode_fattr()
142 *p++ = htonl((u32) stat->nlink); in encode_fattr()
143 *p++ = htonl((u32) from_kuid_munged(userns, stat->uid)); in encode_fattr()
144 *p++ = htonl((u32) from_kgid_munged(userns, stat->gid)); in encode_fattr()
147 *p++ = htonl(NFS_MAXPATHLEN); in encode_fattr()
149 *p++ = htonl((u32) stat->size); in encode_fattr()
151 *p++ = htonl((u32) stat->blksize); in encode_fattr()
153 *p++ = htonl(new_encode_dev(stat->rdev)); in encode_fattr()
155 *p++ = htonl(0xffffffff); in encode_fattr()
156 *p++ = htonl((u32) stat->blocks); in encode_fattr()
160 *p++ = htonl(new_encode_dev(stat->dev)); in encode_fattr()
163 *p++ = htonl((u32) fhp->fh_export->ex_fsid); in encode_fattr()
170 *p++ = htonl(f); in encode_fattr()
173 *p++ = htonl((u32) stat->ino); in encode_fattr()
174 *p++ = htonl((u32) stat->atime.tv_sec); in encode_fattr()
175 *p++ = htonl(stat->atime.tv_nsec ? stat->atime.tv_nsec / 1000 : 0); in encode_fattr()
178 *p++ = htonl((u32) time.tv_sec); in encode_fattr()
179 *p++ = htonl(time.tv_nsec ? time.tv_nsec / 1000 : 0); in encode_fattr()
180 *p++ = htonl((u32) stat->ctime.tv_sec); in encode_fattr()
181 *p++ = htonl(stat->ctime.tv_nsec ? stat->ctime.tv_nsec / 1000 : 0); in encode_fattr()
183 return p; in encode_fattr()
187 __be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp, struct kstat *s… in nfs2svc_encode_fattr() argument
189 return encode_fattr(rqstp, p, fhp, stat); in nfs2svc_encode_fattr()
196 nfssvc_decode_void(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_void() argument
198 return xdr_argsize_check(rqstp, p); in nfssvc_decode_void()
202 nfssvc_decode_fhandle(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_fhandle() argument
206 p = decode_fh(p, &args->fh); in nfssvc_decode_fhandle()
207 if (!p) in nfssvc_decode_fhandle()
209 return xdr_argsize_check(rqstp, p); in nfssvc_decode_fhandle()
213 nfssvc_decode_sattrargs(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_sattrargs() argument
217 p = decode_fh(p, &args->fh); in nfssvc_decode_sattrargs()
218 if (!p) in nfssvc_decode_sattrargs()
220 p = decode_sattr(p, &args->attrs, nfsd_user_namespace(rqstp)); in nfssvc_decode_sattrargs()
222 return xdr_argsize_check(rqstp, p); in nfssvc_decode_sattrargs()
226 nfssvc_decode_diropargs(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_diropargs() argument
230 if (!(p = decode_fh(p, &args->fh)) in nfssvc_decode_diropargs()
231 || !(p = decode_filename(p, &args->name, &args->len))) in nfssvc_decode_diropargs()
234 return xdr_argsize_check(rqstp, p); in nfssvc_decode_diropargs()
238 nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_readargs() argument
243 p = decode_fh(p, &args->fh); in nfssvc_decode_readargs()
244 if (!p) in nfssvc_decode_readargs()
247 args->offset = ntohl(*p++); in nfssvc_decode_readargs()
248 len = args->count = ntohl(*p++); in nfssvc_decode_readargs()
249 p++; /* totalcount - unused */ in nfssvc_decode_readargs()
258 struct page *p = *(rqstp->rq_next_page++); in nfssvc_decode_readargs() local
260 rqstp->rq_vec[v].iov_base = page_address(p); in nfssvc_decode_readargs()
266 return xdr_argsize_check(rqstp, p); in nfssvc_decode_readargs()
270 nfssvc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_writeargs() argument
276 p = decode_fh(p, &args->fh); in nfssvc_decode_writeargs()
277 if (!p) in nfssvc_decode_writeargs()
280 p++; /* beginoffset */ in nfssvc_decode_writeargs()
281 args->offset = ntohl(*p++); /* offset */ in nfssvc_decode_writeargs()
282 p++; /* totalcount */ in nfssvc_decode_writeargs()
283 len = args->len = ntohl(*p++); in nfssvc_decode_writeargs()
294 hdr = (void*)p - head->iov_base; in nfssvc_decode_writeargs()
310 args->first.iov_base = (void *)p; in nfssvc_decode_writeargs()
316 nfssvc_decode_createargs(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_createargs() argument
320 if ( !(p = decode_fh(p, &args->fh)) in nfssvc_decode_createargs()
321 || !(p = decode_filename(p, &args->name, &args->len))) in nfssvc_decode_createargs()
323 p = decode_sattr(p, &args->attrs, nfsd_user_namespace(rqstp)); in nfssvc_decode_createargs()
325 return xdr_argsize_check(rqstp, p); in nfssvc_decode_createargs()
329 nfssvc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_renameargs() argument
333 if (!(p = decode_fh(p, &args->ffh)) in nfssvc_decode_renameargs()
334 || !(p = decode_filename(p, &args->fname, &args->flen)) in nfssvc_decode_renameargs()
335 || !(p = decode_fh(p, &args->tfh)) in nfssvc_decode_renameargs()
336 || !(p = decode_filename(p, &args->tname, &args->tlen))) in nfssvc_decode_renameargs()
339 return xdr_argsize_check(rqstp, p); in nfssvc_decode_renameargs()
343 nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_readlinkargs() argument
347 p = decode_fh(p, &args->fh); in nfssvc_decode_readlinkargs()
348 if (!p) in nfssvc_decode_readlinkargs()
352 return xdr_argsize_check(rqstp, p); in nfssvc_decode_readlinkargs()
356 nfssvc_decode_linkargs(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_linkargs() argument
360 if (!(p = decode_fh(p, &args->ffh)) in nfssvc_decode_linkargs()
361 || !(p = decode_fh(p, &args->tfh)) in nfssvc_decode_linkargs()
362 || !(p = decode_filename(p, &args->tname, &args->tlen))) in nfssvc_decode_linkargs()
365 return xdr_argsize_check(rqstp, p); in nfssvc_decode_linkargs()
369 nfssvc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_symlinkargs() argument
372 char *base = (char *)p; in nfssvc_decode_symlinkargs()
375 if ( !(p = decode_fh(p, &args->ffh)) in nfssvc_decode_symlinkargs()
376 || !(p = decode_filename(p, &args->fname, &args->flen))) in nfssvc_decode_symlinkargs()
379 args->tlen = ntohl(*p++); in nfssvc_decode_symlinkargs()
383 args->first.iov_base = p; in nfssvc_decode_symlinkargs()
385 args->first.iov_len -= (char *)p - base; in nfssvc_decode_symlinkargs()
395 p = rqstp->rq_arg.tail[0].iov_base; in nfssvc_decode_symlinkargs()
400 p += xdrlen; in nfssvc_decode_symlinkargs()
402 decode_sattr(p, &args->attrs, nfsd_user_namespace(rqstp)); in nfssvc_decode_symlinkargs()
408 nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p) in nfssvc_decode_readdirargs() argument
412 p = decode_fh(p, &args->fh); in nfssvc_decode_readdirargs()
413 if (!p) in nfssvc_decode_readdirargs()
415 args->cookie = ntohl(*p++); in nfssvc_decode_readdirargs()
416 args->count = ntohl(*p++); in nfssvc_decode_readdirargs()
420 return xdr_argsize_check(rqstp, p); in nfssvc_decode_readdirargs()
427 nfssvc_encode_void(struct svc_rqst *rqstp, __be32 *p) in nfssvc_encode_void() argument
429 return xdr_ressize_check(rqstp, p); in nfssvc_encode_void()
433 nfssvc_encode_stat(struct svc_rqst *rqstp, __be32 *p) in nfssvc_encode_stat() argument
437 *p++ = resp->status; in nfssvc_encode_stat()
438 return xdr_ressize_check(rqstp, p); in nfssvc_encode_stat()
442 nfssvc_encode_attrstat(struct svc_rqst *rqstp, __be32 *p) in nfssvc_encode_attrstat() argument
446 *p++ = resp->status; in nfssvc_encode_attrstat()
449 p = encode_fattr(rqstp, p, &resp->fh, &resp->stat); in nfssvc_encode_attrstat()
451 return xdr_ressize_check(rqstp, p); in nfssvc_encode_attrstat()
455 nfssvc_encode_diropres(struct svc_rqst *rqstp, __be32 *p) in nfssvc_encode_diropres() argument
459 *p++ = resp->status; in nfssvc_encode_diropres()
462 p = encode_fh(p, &resp->fh); in nfssvc_encode_diropres()
463 p = encode_fattr(rqstp, p, &resp->fh, &resp->stat); in nfssvc_encode_diropres()
465 return xdr_ressize_check(rqstp, p); in nfssvc_encode_diropres()
469 nfssvc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p) in nfssvc_encode_readlinkres() argument
473 *p++ = resp->status; in nfssvc_encode_readlinkres()
475 return xdr_ressize_check(rqstp, p); in nfssvc_encode_readlinkres()
477 *p++ = htonl(resp->len); in nfssvc_encode_readlinkres()
478 xdr_ressize_check(rqstp, p); in nfssvc_encode_readlinkres()
482 rqstp->rq_res.tail[0].iov_base = p; in nfssvc_encode_readlinkres()
483 *p = 0; in nfssvc_encode_readlinkres()
490 nfssvc_encode_readres(struct svc_rqst *rqstp, __be32 *p) in nfssvc_encode_readres() argument
494 *p++ = resp->status; in nfssvc_encode_readres()
496 return xdr_ressize_check(rqstp, p); in nfssvc_encode_readres()
498 p = encode_fattr(rqstp, p, &resp->fh, &resp->stat); in nfssvc_encode_readres()
499 *p++ = htonl(resp->count); in nfssvc_encode_readres()
500 xdr_ressize_check(rqstp, p); in nfssvc_encode_readres()
506 rqstp->rq_res.tail[0].iov_base = p; in nfssvc_encode_readres()
507 *p = 0; in nfssvc_encode_readres()
514 nfssvc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p) in nfssvc_encode_readdirres() argument
518 *p++ = resp->status; in nfssvc_encode_readdirres()
520 return xdr_ressize_check(rqstp, p); in nfssvc_encode_readdirres()
522 xdr_ressize_check(rqstp, p); in nfssvc_encode_readdirres()
523 p = resp->buffer; in nfssvc_encode_readdirres()
524 *p++ = 0; /* no more entries */ in nfssvc_encode_readdirres()
525 *p++ = htonl((resp->common.err == nfserr_eof)); in nfssvc_encode_readdirres()
526 rqstp->rq_res.page_len = (((unsigned long)p-1) & ~PAGE_MASK)+1; in nfssvc_encode_readdirres()
532 nfssvc_encode_statfsres(struct svc_rqst *rqstp, __be32 *p) in nfssvc_encode_statfsres() argument
537 *p++ = resp->status; in nfssvc_encode_statfsres()
539 return xdr_ressize_check(rqstp, p); in nfssvc_encode_statfsres()
541 *p++ = htonl(NFSSVC_MAXBLKSIZE_V2); /* max transfer size */ in nfssvc_encode_statfsres()
542 *p++ = htonl(stat->f_bsize); in nfssvc_encode_statfsres()
543 *p++ = htonl(stat->f_blocks); in nfssvc_encode_statfsres()
544 *p++ = htonl(stat->f_bfree); in nfssvc_encode_statfsres()
545 *p++ = htonl(stat->f_bavail); in nfssvc_encode_statfsres()
546 return xdr_ressize_check(rqstp, p); in nfssvc_encode_statfsres()
555 __be32 *p = cd->buffer; in nfssvc_encode_entry() local
582 *p++ = xdr_one; /* mark entry present */ in nfssvc_encode_entry()
583 *p++ = htonl((u32) ino); /* file id */ in nfssvc_encode_entry()
584 p = xdr_encode_array(p, name, namlen);/* name length & name */ in nfssvc_encode_entry()
585 cd->offset = p; /* remember pointer */ in nfssvc_encode_entry()
586 *p++ = htonl(~0U); /* offset of next entry */ in nfssvc_encode_entry()
589 cd->buffer = p; in nfssvc_encode_entry()