Lines Matching full:resp

743 	struct nfsd3_attrstat *resp = rqstp->rq_resp;  in nfs3svc_encode_getattrres()  local
745 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_getattrres()
747 switch (resp->status) { in nfs3svc_encode_getattrres()
749 lease_get_mtime(d_inode(resp->fh.fh_dentry), &resp->stat.mtime); in nfs3svc_encode_getattrres()
750 if (!svcxdr_encode_fattr3(rqstp, xdr, &resp->fh, &resp->stat)) in nfs3svc_encode_getattrres()
762 struct nfsd3_attrstat *resp = rqstp->rq_resp; in nfs3svc_encode_wccstat() local
764 return svcxdr_encode_nfsstat3(xdr, resp->status) && in nfs3svc_encode_wccstat()
765 svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh); in nfs3svc_encode_wccstat()
772 struct nfsd3_diropres *resp = rqstp->rq_resp; in nfs3svc_encode_lookupres() local
774 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_lookupres()
776 switch (resp->status) { in nfs3svc_encode_lookupres()
778 if (!svcxdr_encode_nfs_fh3(xdr, &resp->fh)) in nfs3svc_encode_lookupres()
780 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_lookupres()
782 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->dirfh)) in nfs3svc_encode_lookupres()
786 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->dirfh)) in nfs3svc_encode_lookupres()
797 struct nfsd3_accessres *resp = rqstp->rq_resp; in nfs3svc_encode_accessres() local
799 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_accessres()
801 switch (resp->status) { in nfs3svc_encode_accessres()
803 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_accessres()
805 if (xdr_stream_encode_u32(xdr, resp->access) < 0) in nfs3svc_encode_accessres()
809 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_accessres()
820 struct nfsd3_readlinkres *resp = rqstp->rq_resp; in nfs3svc_encode_readlinkres() local
823 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_readlinkres()
825 switch (resp->status) { in nfs3svc_encode_readlinkres()
827 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_readlinkres()
829 if (xdr_stream_encode_u32(xdr, resp->len) < 0) in nfs3svc_encode_readlinkres()
831 xdr_write_pages(xdr, resp->pages, 0, resp->len); in nfs3svc_encode_readlinkres()
832 if (svc_encode_result_payload(rqstp, head->iov_len, resp->len) < 0) in nfs3svc_encode_readlinkres()
836 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_readlinkres()
847 struct nfsd3_readres *resp = rqstp->rq_resp; in nfs3svc_encode_readres() local
850 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_readres()
852 switch (resp->status) { in nfs3svc_encode_readres()
854 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_readres()
856 if (xdr_stream_encode_u32(xdr, resp->count) < 0) in nfs3svc_encode_readres()
858 if (xdr_stream_encode_bool(xdr, resp->eof) < 0) in nfs3svc_encode_readres()
860 if (xdr_stream_encode_u32(xdr, resp->count) < 0) in nfs3svc_encode_readres()
862 xdr_write_pages(xdr, resp->pages, rqstp->rq_res.page_base, in nfs3svc_encode_readres()
863 resp->count); in nfs3svc_encode_readres()
864 if (svc_encode_result_payload(rqstp, head->iov_len, resp->count) < 0) in nfs3svc_encode_readres()
868 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_readres()
879 struct nfsd3_writeres *resp = rqstp->rq_resp; in nfs3svc_encode_writeres() local
881 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_writeres()
883 switch (resp->status) { in nfs3svc_encode_writeres()
885 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh)) in nfs3svc_encode_writeres()
887 if (xdr_stream_encode_u32(xdr, resp->count) < 0) in nfs3svc_encode_writeres()
889 if (xdr_stream_encode_u32(xdr, resp->committed) < 0) in nfs3svc_encode_writeres()
891 if (!svcxdr_encode_writeverf3(xdr, resp->verf)) in nfs3svc_encode_writeres()
895 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh)) in nfs3svc_encode_writeres()
906 struct nfsd3_diropres *resp = rqstp->rq_resp; in nfs3svc_encode_createres() local
908 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_createres()
910 switch (resp->status) { in nfs3svc_encode_createres()
912 if (!svcxdr_encode_post_op_fh3(xdr, &resp->fh)) in nfs3svc_encode_createres()
914 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_createres()
916 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->dirfh)) in nfs3svc_encode_createres()
920 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->dirfh)) in nfs3svc_encode_createres()
931 struct nfsd3_renameres *resp = rqstp->rq_resp; in nfs3svc_encode_renameres() local
933 return svcxdr_encode_nfsstat3(xdr, resp->status) && in nfs3svc_encode_renameres()
934 svcxdr_encode_wcc_data(rqstp, xdr, &resp->ffh) && in nfs3svc_encode_renameres()
935 svcxdr_encode_wcc_data(rqstp, xdr, &resp->tfh); in nfs3svc_encode_renameres()
942 struct nfsd3_linkres *resp = rqstp->rq_resp; in nfs3svc_encode_linkres() local
944 return svcxdr_encode_nfsstat3(xdr, resp->status) && in nfs3svc_encode_linkres()
945 svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh) && in nfs3svc_encode_linkres()
946 svcxdr_encode_wcc_data(rqstp, xdr, &resp->tfh); in nfs3svc_encode_linkres()
953 struct nfsd3_readdirres *resp = rqstp->rq_resp; in nfs3svc_encode_readdirres() local
954 struct xdr_buf *dirlist = &resp->dirlist; in nfs3svc_encode_readdirres()
956 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_readdirres()
958 switch (resp->status) { in nfs3svc_encode_readdirres()
960 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_readdirres()
962 if (!svcxdr_encode_cookieverf3(xdr, resp->verf)) in nfs3svc_encode_readdirres()
968 if (xdr_stream_encode_bool(xdr, resp->common.err == nfserr_eof) < 0) in nfs3svc_encode_readdirres()
972 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_readdirres()
1019 * @resp: readdir result context
1025 void nfs3svc_encode_cookie3(struct nfsd3_readdirres *resp, u64 offset) in nfs3svc_encode_cookie3() argument
1029 if (!resp->cookie_offset) in nfs3svc_encode_cookie3()
1031 write_bytes_to_xdr_buf(&resp->dirlist, resp->cookie_offset, &cookie, in nfs3svc_encode_cookie3()
1033 resp->cookie_offset = 0; in nfs3svc_encode_cookie3()
1037 svcxdr_encode_entry3_common(struct nfsd3_readdirres *resp, const char *name, in svcxdr_encode_entry3_common() argument
1040 struct xdr_buf *dirlist = &resp->dirlist; in svcxdr_encode_entry3_common()
1041 struct xdr_stream *xdr = &resp->xdr; in svcxdr_encode_entry3_common()
1052 resp->cookie_offset = dirlist->len; in svcxdr_encode_entry3_common()
1070 * %-EINVAL: An encoding problem occured, secondary status code in resp->common.err
1073 * - resp->xdr
1074 * - resp->common.err
1075 * - resp->cookie_offset
1081 struct nfsd3_readdirres *resp = container_of(ccd, in nfs3svc_encode_entry3() local
1084 unsigned int starting_length = resp->dirlist.len; in nfs3svc_encode_entry3()
1087 nfs3svc_encode_cookie3(resp, offset); in nfs3svc_encode_entry3()
1089 if (!svcxdr_encode_entry3_common(resp, name, namlen, offset, ino)) in nfs3svc_encode_entry3()
1092 xdr_commit_encode(&resp->xdr); in nfs3svc_encode_entry3()
1093 resp->common.err = nfs_ok; in nfs3svc_encode_entry3()
1097 resp->cookie_offset = 0; in nfs3svc_encode_entry3()
1098 resp->common.err = nfserr_toosmall; in nfs3svc_encode_entry3()
1099 resp->dirlist.len = starting_length; in nfs3svc_encode_entry3()
1104 svcxdr_encode_entry3_plus(struct nfsd3_readdirres *resp, const char *name, in svcxdr_encode_entry3_plus() argument
1107 struct xdr_stream *xdr = &resp->xdr; in svcxdr_encode_entry3_plus()
1108 struct svc_fh *fhp = &resp->scratch; in svcxdr_encode_entry3_plus()
1113 if (compose_entry_fh(resp, fhp, name, namlen, ino) != nfs_ok) in svcxdr_encode_entry3_plus()
1116 if (!svcxdr_encode_post_op_attr(resp->rqstp, xdr, fhp)) in svcxdr_encode_entry3_plus()
1145 * %-EINVAL: An encoding problem occured, secondary status code in resp->common.err
1148 * - resp->xdr
1149 * - resp->common.err
1150 * - resp->cookie_offset
1156 struct nfsd3_readdirres *resp = container_of(ccd, in nfs3svc_encode_entryplus3() local
1159 unsigned int starting_length = resp->dirlist.len; in nfs3svc_encode_entryplus3()
1162 nfs3svc_encode_cookie3(resp, offset); in nfs3svc_encode_entryplus3()
1164 if (!svcxdr_encode_entry3_common(resp, name, namlen, offset, ino)) in nfs3svc_encode_entryplus3()
1166 if (!svcxdr_encode_entry3_plus(resp, name, namlen, ino)) in nfs3svc_encode_entryplus3()
1169 xdr_commit_encode(&resp->xdr); in nfs3svc_encode_entryplus3()
1170 resp->common.err = nfs_ok; in nfs3svc_encode_entryplus3()
1174 resp->cookie_offset = 0; in nfs3svc_encode_entryplus3()
1175 resp->common.err = nfserr_toosmall; in nfs3svc_encode_entryplus3()
1176 resp->dirlist.len = starting_length; in nfs3svc_encode_entryplus3()
1182 const struct nfsd3_fsstatres *resp) in svcxdr_encode_fsstat3resok() argument
1184 const struct kstatfs *s = &resp->stats; in svcxdr_encode_fsstat3resok()
1197 *p = cpu_to_be32(resp->invarsec); /* mean unchanged time */ in svcxdr_encode_fsstat3resok()
1206 struct nfsd3_fsstatres *resp = rqstp->rq_resp; in nfs3svc_encode_fsstatres() local
1208 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_fsstatres()
1210 switch (resp->status) { in nfs3svc_encode_fsstatres()
1214 if (!svcxdr_encode_fsstat3resok(xdr, resp)) in nfs3svc_encode_fsstatres()
1227 const struct nfsd3_fsinfores *resp) in svcxdr_encode_fsinfo3resok() argument
1234 *p++ = cpu_to_be32(resp->f_rtmax); in svcxdr_encode_fsinfo3resok()
1235 *p++ = cpu_to_be32(resp->f_rtpref); in svcxdr_encode_fsinfo3resok()
1236 *p++ = cpu_to_be32(resp->f_rtmult); in svcxdr_encode_fsinfo3resok()
1237 *p++ = cpu_to_be32(resp->f_wtmax); in svcxdr_encode_fsinfo3resok()
1238 *p++ = cpu_to_be32(resp->f_wtpref); in svcxdr_encode_fsinfo3resok()
1239 *p++ = cpu_to_be32(resp->f_wtmult); in svcxdr_encode_fsinfo3resok()
1240 *p++ = cpu_to_be32(resp->f_dtpref); in svcxdr_encode_fsinfo3resok()
1241 p = xdr_encode_hyper(p, resp->f_maxfilesize); in svcxdr_encode_fsinfo3resok()
1243 *p = cpu_to_be32(resp->f_properties); in svcxdr_encode_fsinfo3resok()
1252 struct nfsd3_fsinfores *resp = rqstp->rq_resp; in nfs3svc_encode_fsinfores() local
1254 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_fsinfores()
1256 switch (resp->status) { in nfs3svc_encode_fsinfores()
1260 if (!svcxdr_encode_fsinfo3resok(xdr, resp)) in nfs3svc_encode_fsinfores()
1273 const struct nfsd3_pathconfres *resp) in svcxdr_encode_pathconf3resok() argument
1280 *p++ = cpu_to_be32(resp->p_link_max); in svcxdr_encode_pathconf3resok()
1281 *p++ = cpu_to_be32(resp->p_name_max); in svcxdr_encode_pathconf3resok()
1282 p = xdr_encode_bool(p, resp->p_no_trunc); in svcxdr_encode_pathconf3resok()
1283 p = xdr_encode_bool(p, resp->p_chown_restricted); in svcxdr_encode_pathconf3resok()
1284 p = xdr_encode_bool(p, resp->p_case_insensitive); in svcxdr_encode_pathconf3resok()
1285 xdr_encode_bool(p, resp->p_case_preserving); in svcxdr_encode_pathconf3resok()
1294 struct nfsd3_pathconfres *resp = rqstp->rq_resp; in nfs3svc_encode_pathconfres() local
1296 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_pathconfres()
1298 switch (resp->status) { in nfs3svc_encode_pathconfres()
1302 if (!svcxdr_encode_pathconf3resok(xdr, resp)) in nfs3svc_encode_pathconfres()
1317 struct nfsd3_commitres *resp = rqstp->rq_resp; in nfs3svc_encode_commitres() local
1319 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_commitres()
1321 switch (resp->status) { in nfs3svc_encode_commitres()
1323 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh)) in nfs3svc_encode_commitres()
1325 if (!svcxdr_encode_writeverf3(xdr, resp->verf)) in nfs3svc_encode_commitres()
1329 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh)) in nfs3svc_encode_commitres()
1342 struct nfsd3_attrstat *resp = rqstp->rq_resp; in nfs3svc_release_fhandle() local
1344 fh_put(&resp->fh); in nfs3svc_release_fhandle()
1350 struct nfsd3_fhandle_pair *resp = rqstp->rq_resp; in nfs3svc_release_fhandle2() local
1352 fh_put(&resp->fh1); in nfs3svc_release_fhandle2()
1353 fh_put(&resp->fh2); in nfs3svc_release_fhandle2()