Lines Matching refs:resp
418 struct nfsd_stat *resp = rqstp->rq_resp;
420 return svcxdr_encode_stat(xdr, resp->status);
426 struct nfsd_attrstat *resp = rqstp->rq_resp;
428 if (!svcxdr_encode_stat(xdr, resp->status))
430 switch (resp->status) {
432 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat))
443 struct nfsd_diropres *resp = rqstp->rq_resp;
445 if (!svcxdr_encode_stat(xdr, resp->status))
447 switch (resp->status) {
449 if (!svcxdr_encode_fhandle(xdr, &resp->fh))
451 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat))
462 struct nfsd_readlinkres *resp = rqstp->rq_resp;
465 if (!svcxdr_encode_stat(xdr, resp->status))
467 switch (resp->status) {
469 if (xdr_stream_encode_u32(xdr, resp->len) < 0)
471 svcxdr_encode_opaque_pages(rqstp, xdr, &resp->page, 0,
472 resp->len);
473 if (svc_encode_result_payload(rqstp, head->iov_len, resp->len) < 0)
484 struct nfsd_readres *resp = rqstp->rq_resp;
487 if (!svcxdr_encode_stat(xdr, resp->status))
489 switch (resp->status) {
491 if (!svcxdr_encode_fattr(rqstp, xdr, &resp->fh, &resp->stat))
493 if (xdr_stream_encode_u32(xdr, resp->count) < 0)
495 svcxdr_encode_opaque_pages(rqstp, xdr, resp->pages,
497 resp->count);
498 if (svc_encode_result_payload(rqstp, head->iov_len, resp->count) < 0)
509 struct nfsd_readdirres *resp = rqstp->rq_resp;
510 struct xdr_buf *dirlist = &resp->dirlist;
512 if (!svcxdr_encode_stat(xdr, resp->status))
514 switch (resp->status) {
521 if (xdr_stream_encode_bool(xdr, resp->common.err == nfserr_eof) < 0)
532 struct nfsd_statfsres *resp = rqstp->rq_resp;
533 struct kstatfs *stat = &resp->stats;
536 if (!svcxdr_encode_stat(xdr, resp->status))
538 switch (resp->status) {
556 * @resp: readdir result context
562 void nfssvc_encode_nfscookie(struct nfsd_readdirres *resp, u32 offset)
566 if (!resp->cookie_offset)
569 write_bytes_to_xdr_buf(&resp->dirlist, resp->cookie_offset, &cookie,
571 resp->cookie_offset = 0;
575 svcxdr_encode_entry_common(struct nfsd_readdirres *resp, const char *name,
578 struct xdr_buf *dirlist = &resp->dirlist;
579 struct xdr_stream *xdr = &resp->xdr;
590 resp->cookie_offset = dirlist->len;
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,
622 unsigned int starting_length = resp->dirlist.len;
625 nfssvc_encode_nfscookie(resp, offset);
627 if (!svcxdr_encode_entry_common(resp, name, namlen, offset, ino))
630 xdr_commit_encode(&resp->xdr);
631 resp->common.err = nfs_ok;
635 resp->cookie_offset = 0;
636 resp->common.err = nfserr_toosmall;
637 resp->dirlist.len = starting_length;
646 struct nfsd_attrstat *resp = rqstp->rq_resp;
648 fh_put(&resp->fh);
653 struct nfsd_diropres *resp = rqstp->rq_resp;
655 fh_put(&resp->fh);
660 struct nfsd_readres *resp = rqstp->rq_resp;
662 fh_put(&resp->fh);