Lines Matching full:resp
418 struct nfsd_stat *resp = rqstp->rq_resp; in nfssvc_encode_statres() local
420 return svcxdr_encode_stat(xdr, resp->status); in nfssvc_encode_statres()
426 struct nfsd_attrstat *resp = rqstp->rq_resp; in nfssvc_encode_attrstatres() local
428 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_attrstatres()
430 switch (resp->status) { in nfssvc_encode_attrstatres()
432 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat)) in nfssvc_encode_attrstatres()
443 struct nfsd_diropres *resp = rqstp->rq_resp; in nfssvc_encode_diropres() local
445 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_diropres()
447 switch (resp->status) { in nfssvc_encode_diropres()
449 if (!svcxdr_encode_fhandle(xdr, &resp->fh)) in nfssvc_encode_diropres()
451 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat)) in nfssvc_encode_diropres()
462 struct nfsd_readlinkres *resp = rqstp->rq_resp; in nfssvc_encode_readlinkres() local
465 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_readlinkres()
467 switch (resp->status) { in nfssvc_encode_readlinkres()
469 if (xdr_stream_encode_u32(xdr, resp->len) < 0) in nfssvc_encode_readlinkres()
471 svcxdr_encode_opaque_pages(rqstp, xdr, &resp->page, 0, in nfssvc_encode_readlinkres()
472 resp->len); in nfssvc_encode_readlinkres()
473 if (svc_encode_result_payload(rqstp, head->iov_len, resp->len) < 0) in nfssvc_encode_readlinkres()
484 struct nfsd_readres *resp = rqstp->rq_resp; in nfssvc_encode_readres() local
487 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_readres()
489 switch (resp->status) { in nfssvc_encode_readres()
491 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat)) in nfssvc_encode_readres()
493 if (xdr_stream_encode_u32(xdr, resp->count) < 0) in nfssvc_encode_readres()
495 svcxdr_encode_opaque_pages(rqstp, xdr, resp->pages, in nfssvc_encode_readres()
497 resp->count); in nfssvc_encode_readres()
498 if (svc_encode_result_payload(rqstp, head->iov_len, resp->count) < 0) in nfssvc_encode_readres()
509 struct nfsd_readdirres *resp = rqstp->rq_resp; in nfssvc_encode_readdirres() local
510 struct xdr_buf *dirlist = &resp->dirlist; in nfssvc_encode_readdirres()
512 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_readdirres()
514 switch (resp->status) { in nfssvc_encode_readdirres()
521 if (xdr_stream_encode_bool(xdr, resp->common.err == nfserr_eof) < 0) in nfssvc_encode_readdirres()
532 struct nfsd_statfsres *resp = rqstp->rq_resp; in nfssvc_encode_statfsres() local
533 struct kstatfs *stat = &resp->stats; in nfssvc_encode_statfsres()
536 if (!svcxdr_encode_stat(xdr, resp->status)) in nfssvc_encode_statfsres()
538 switch (resp->status) { in nfssvc_encode_statfsres()
556 * @resp: readdir result context
562 void nfssvc_encode_nfscookie(struct nfsd_readdirres *resp, u32 offset) in nfssvc_encode_nfscookie() argument
566 if (!resp->cookie_offset) in nfssvc_encode_nfscookie()
569 write_bytes_to_xdr_buf(&resp->dirlist, resp->cookie_offset, &cookie, in nfssvc_encode_nfscookie()
571 resp->cookie_offset = 0; in nfssvc_encode_nfscookie()
575 svcxdr_encode_entry_common(struct nfsd_readdirres *resp, const char *name, in svcxdr_encode_entry_common() argument
578 struct xdr_buf *dirlist = &resp->dirlist; in svcxdr_encode_entry_common()
579 struct xdr_stream *xdr = &resp->xdr; in svcxdr_encode_entry_common()
590 resp->cookie_offset = dirlist->len; in svcxdr_encode_entry_common()
608 * %-EINVAL: An encoding problem occured, secondary status code in resp->common.err
611 * - resp->xdr
612 * - resp->common.err
613 * - resp->cookie_offset
619 struct nfsd_readdirres *resp = container_of(ccd, in nfssvc_encode_entry() local
622 unsigned int starting_length = resp->dirlist.len; in nfssvc_encode_entry()
625 nfssvc_encode_nfscookie(resp, offset); in nfssvc_encode_entry()
627 if (!svcxdr_encode_entry_common(resp, name, namlen, offset, ino)) in nfssvc_encode_entry()
630 xdr_commit_encode(&resp->xdr); in nfssvc_encode_entry()
631 resp->common.err = nfs_ok; in nfssvc_encode_entry()
635 resp->cookie_offset = 0; in nfssvc_encode_entry()
636 resp->common.err = nfserr_toosmall; in nfssvc_encode_entry()
637 resp->dirlist.len = starting_length; in nfssvc_encode_entry()
646 struct nfsd_attrstat *resp = rqstp->rq_resp; in nfssvc_release_attrstat() local
648 fh_put(&resp->fh); in nfssvc_release_attrstat()
653 struct nfsd_diropres *resp = rqstp->rq_resp; in nfssvc_release_diropres() local
655 fh_put(&resp->fh); in nfssvc_release_diropres()
660 struct nfsd_readres *resp = rqstp->rq_resp; in nfssvc_release_readres() local
662 fh_put(&resp->fh); in nfssvc_release_readres()