Lines Matching full:resp

740 	struct nfsd3_attrstat *resp = rqstp->rq_resp;  in nfs3svc_encode_getattrres()  local
742 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_getattrres()
744 switch (resp->status) { in nfs3svc_encode_getattrres()
746 lease_get_mtime(d_inode(resp->fh.fh_dentry), &resp->stat.mtime); in nfs3svc_encode_getattrres()
747 if (!svcxdr_encode_fattr3(rqstp, xdr, &resp->fh, &resp->stat)) in nfs3svc_encode_getattrres()
759 struct nfsd3_attrstat *resp = rqstp->rq_resp; in nfs3svc_encode_wccstat() local
761 return svcxdr_encode_nfsstat3(xdr, resp->status) && in nfs3svc_encode_wccstat()
762 svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh); in nfs3svc_encode_wccstat()
769 struct nfsd3_diropres *resp = rqstp->rq_resp; in nfs3svc_encode_lookupres() local
771 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_lookupres()
773 switch (resp->status) { in nfs3svc_encode_lookupres()
775 if (!svcxdr_encode_nfs_fh3(xdr, &resp->fh)) in nfs3svc_encode_lookupres()
777 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_lookupres()
779 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->dirfh)) in nfs3svc_encode_lookupres()
783 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->dirfh)) in nfs3svc_encode_lookupres()
794 struct nfsd3_accessres *resp = rqstp->rq_resp; in nfs3svc_encode_accessres() local
796 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_accessres()
798 switch (resp->status) { in nfs3svc_encode_accessres()
800 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_accessres()
802 if (xdr_stream_encode_u32(xdr, resp->access) < 0) in nfs3svc_encode_accessres()
806 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_accessres()
817 struct nfsd3_readlinkres *resp = rqstp->rq_resp; in nfs3svc_encode_readlinkres() local
820 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_readlinkres()
822 switch (resp->status) { in nfs3svc_encode_readlinkres()
824 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_readlinkres()
826 if (xdr_stream_encode_u32(xdr, resp->len) < 0) in nfs3svc_encode_readlinkres()
828 svcxdr_encode_opaque_pages(rqstp, xdr, resp->pages, 0, in nfs3svc_encode_readlinkres()
829 resp->len); in nfs3svc_encode_readlinkres()
830 if (svc_encode_result_payload(rqstp, head->iov_len, resp->len) < 0) in nfs3svc_encode_readlinkres()
834 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_readlinkres()
845 struct nfsd3_readres *resp = rqstp->rq_resp; in nfs3svc_encode_readres() local
848 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_readres()
850 switch (resp->status) { in nfs3svc_encode_readres()
852 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_readres()
854 if (xdr_stream_encode_u32(xdr, resp->count) < 0) in nfs3svc_encode_readres()
856 if (xdr_stream_encode_bool(xdr, resp->eof) < 0) in nfs3svc_encode_readres()
858 if (xdr_stream_encode_u32(xdr, resp->count) < 0) in nfs3svc_encode_readres()
860 svcxdr_encode_opaque_pages(rqstp, xdr, resp->pages, in nfs3svc_encode_readres()
862 resp->count); in nfs3svc_encode_readres()
863 if (svc_encode_result_payload(rqstp, head->iov_len, resp->count) < 0) in nfs3svc_encode_readres()
867 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_readres()
878 struct nfsd3_writeres *resp = rqstp->rq_resp; in nfs3svc_encode_writeres() local
880 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_writeres()
882 switch (resp->status) { in nfs3svc_encode_writeres()
884 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh)) in nfs3svc_encode_writeres()
886 if (xdr_stream_encode_u32(xdr, resp->count) < 0) in nfs3svc_encode_writeres()
888 if (xdr_stream_encode_u32(xdr, resp->committed) < 0) in nfs3svc_encode_writeres()
890 if (!svcxdr_encode_writeverf3(xdr, resp->verf)) in nfs3svc_encode_writeres()
894 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh)) in nfs3svc_encode_writeres()
905 struct nfsd3_diropres *resp = rqstp->rq_resp; in nfs3svc_encode_createres() local
907 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_createres()
909 switch (resp->status) { in nfs3svc_encode_createres()
911 if (!svcxdr_encode_post_op_fh3(xdr, &resp->fh)) in nfs3svc_encode_createres()
913 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_createres()
915 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->dirfh)) in nfs3svc_encode_createres()
919 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->dirfh)) in nfs3svc_encode_createres()
930 struct nfsd3_renameres *resp = rqstp->rq_resp; in nfs3svc_encode_renameres() local
932 return svcxdr_encode_nfsstat3(xdr, resp->status) && in nfs3svc_encode_renameres()
933 svcxdr_encode_wcc_data(rqstp, xdr, &resp->ffh) && in nfs3svc_encode_renameres()
934 svcxdr_encode_wcc_data(rqstp, xdr, &resp->tfh); in nfs3svc_encode_renameres()
941 struct nfsd3_linkres *resp = rqstp->rq_resp; in nfs3svc_encode_linkres() local
943 return svcxdr_encode_nfsstat3(xdr, resp->status) && in nfs3svc_encode_linkres()
944 svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh) && in nfs3svc_encode_linkres()
945 svcxdr_encode_wcc_data(rqstp, xdr, &resp->tfh); in nfs3svc_encode_linkres()
952 struct nfsd3_readdirres *resp = rqstp->rq_resp; in nfs3svc_encode_readdirres() local
953 struct xdr_buf *dirlist = &resp->dirlist; in nfs3svc_encode_readdirres()
955 if (!svcxdr_encode_nfsstat3(xdr, resp->status)) in nfs3svc_encode_readdirres()
957 switch (resp->status) { in nfs3svc_encode_readdirres()
959 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh)) in nfs3svc_encode_readdirres()
961 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()