Lines Matching refs:resp
743 struct nfsd3_attrstat *resp = rqstp->rq_resp;
745 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
747 switch (resp->status) {
749 lease_get_mtime(d_inode(resp->fh.fh_dentry), &resp->stat.mtime);
750 if (!svcxdr_encode_fattr3(rqstp, xdr, &resp->fh, &resp->stat))
762 struct nfsd3_attrstat *resp = rqstp->rq_resp;
764 return svcxdr_encode_nfsstat3(xdr, resp->status) &&
765 svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh);
772 struct nfsd3_diropres *resp = rqstp->rq_resp;
774 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
776 switch (resp->status) {
778 if (!svcxdr_encode_nfs_fh3(xdr, &resp->fh))
780 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh))
782 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->dirfh))
786 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->dirfh))
797 struct nfsd3_accessres *resp = rqstp->rq_resp;
799 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
801 switch (resp->status) {
803 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh))
805 if (xdr_stream_encode_u32(xdr, resp->access) < 0)
809 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh))
820 struct nfsd3_readlinkres *resp = rqstp->rq_resp;
823 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
825 switch (resp->status) {
827 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh))
829 if (xdr_stream_encode_u32(xdr, resp->len) < 0)
831 svcxdr_encode_opaque_pages(rqstp, xdr, resp->pages, 0,
832 resp->len);
833 if (svc_encode_result_payload(rqstp, head->iov_len, resp->len) < 0)
837 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh))
848 struct nfsd3_readres *resp = rqstp->rq_resp;
851 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
853 switch (resp->status) {
855 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh))
857 if (xdr_stream_encode_u32(xdr, resp->count) < 0)
859 if (xdr_stream_encode_bool(xdr, resp->eof) < 0)
861 if (xdr_stream_encode_u32(xdr, resp->count) < 0)
863 svcxdr_encode_opaque_pages(rqstp, xdr, resp->pages,
865 resp->count);
866 if (svc_encode_result_payload(rqstp, head->iov_len, resp->count) < 0)
870 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh))
881 struct nfsd3_writeres *resp = rqstp->rq_resp;
883 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
885 switch (resp->status) {
887 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh))
889 if (xdr_stream_encode_u32(xdr, resp->count) < 0)
891 if (xdr_stream_encode_u32(xdr, resp->committed) < 0)
893 if (!svcxdr_encode_writeverf3(xdr, resp->verf))
897 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh))
908 struct nfsd3_diropres *resp = rqstp->rq_resp;
910 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
912 switch (resp->status) {
914 if (!svcxdr_encode_post_op_fh3(xdr, &resp->fh))
916 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh))
918 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->dirfh))
922 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->dirfh))
933 struct nfsd3_renameres *resp = rqstp->rq_resp;
935 return svcxdr_encode_nfsstat3(xdr, resp->status) &&
936 svcxdr_encode_wcc_data(rqstp, xdr, &resp->ffh) &&
937 svcxdr_encode_wcc_data(rqstp, xdr, &resp->tfh);
944 struct nfsd3_linkres *resp = rqstp->rq_resp;
946 return svcxdr_encode_nfsstat3(xdr, resp->status) &&
947 svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh) &&
948 svcxdr_encode_wcc_data(rqstp, xdr, &resp->tfh);
955 struct nfsd3_readdirres *resp = rqstp->rq_resp;
956 struct xdr_buf *dirlist = &resp->dirlist;
958 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
960 switch (resp->status) {
962 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh))
964 if (!svcxdr_encode_cookieverf3(xdr, resp->verf))
971 if (xdr_stream_encode_bool(xdr, resp->common.err == nfserr_eof) < 0)
975 if (!svcxdr_encode_post_op_attr(rqstp, xdr, &resp->fh))
1022 * @resp: readdir result context
1028 void nfs3svc_encode_cookie3(struct nfsd3_readdirres *resp, u64 offset)
1032 if (!resp->cookie_offset)
1034 write_bytes_to_xdr_buf(&resp->dirlist, resp->cookie_offset, &cookie,
1036 resp->cookie_offset = 0;
1040 svcxdr_encode_entry3_common(struct nfsd3_readdirres *resp, const char *name,
1043 struct xdr_buf *dirlist = &resp->dirlist;
1044 struct xdr_stream *xdr = &resp->xdr;
1055 resp->cookie_offset = dirlist->len;
1073 * %-EINVAL: An encoding problem occured, secondary status code in resp->common.err
1076 * - resp->xdr
1077 * - resp->common.err
1078 * - resp->cookie_offset
1084 struct nfsd3_readdirres *resp = container_of(ccd,
1087 unsigned int starting_length = resp->dirlist.len;
1090 nfs3svc_encode_cookie3(resp, offset);
1092 if (!svcxdr_encode_entry3_common(resp, name, namlen, offset, ino))
1095 xdr_commit_encode(&resp->xdr);
1096 resp->common.err = nfs_ok;
1100 resp->cookie_offset = 0;
1101 resp->common.err = nfserr_toosmall;
1102 resp->dirlist.len = starting_length;
1107 svcxdr_encode_entry3_plus(struct nfsd3_readdirres *resp, const char *name,
1110 struct xdr_stream *xdr = &resp->xdr;
1111 struct svc_fh *fhp = &resp->scratch;
1116 if (compose_entry_fh(resp, fhp, name, namlen, ino) != nfs_ok)
1119 if (!svcxdr_encode_post_op_attr(resp->rqstp, xdr, fhp))
1148 * %-EINVAL: An encoding problem occured, secondary status code in resp->common.err
1151 * - resp->xdr
1152 * - resp->common.err
1153 * - resp->cookie_offset
1159 struct nfsd3_readdirres *resp = container_of(ccd,
1162 unsigned int starting_length = resp->dirlist.len;
1165 nfs3svc_encode_cookie3(resp, offset);
1167 if (!svcxdr_encode_entry3_common(resp, name, namlen, offset, ino))
1169 if (!svcxdr_encode_entry3_plus(resp, name, namlen, ino))
1172 xdr_commit_encode(&resp->xdr);
1173 resp->common.err = nfs_ok;
1177 resp->cookie_offset = 0;
1178 resp->common.err = nfserr_toosmall;
1179 resp->dirlist.len = starting_length;
1185 const struct nfsd3_fsstatres *resp)
1187 const struct kstatfs *s = &resp->stats;
1200 *p = cpu_to_be32(resp->invarsec); /* mean unchanged time */
1209 struct nfsd3_fsstatres *resp = rqstp->rq_resp;
1211 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
1213 switch (resp->status) {
1217 if (!svcxdr_encode_fsstat3resok(xdr, resp))
1230 const struct nfsd3_fsinfores *resp)
1237 *p++ = cpu_to_be32(resp->f_rtmax);
1238 *p++ = cpu_to_be32(resp->f_rtpref);
1239 *p++ = cpu_to_be32(resp->f_rtmult);
1240 *p++ = cpu_to_be32(resp->f_wtmax);
1241 *p++ = cpu_to_be32(resp->f_wtpref);
1242 *p++ = cpu_to_be32(resp->f_wtmult);
1243 *p++ = cpu_to_be32(resp->f_dtpref);
1244 p = xdr_encode_hyper(p, resp->f_maxfilesize);
1246 *p = cpu_to_be32(resp->f_properties);
1255 struct nfsd3_fsinfores *resp = rqstp->rq_resp;
1257 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
1259 switch (resp->status) {
1263 if (!svcxdr_encode_fsinfo3resok(xdr, resp))
1276 const struct nfsd3_pathconfres *resp)
1283 *p++ = cpu_to_be32(resp->p_link_max);
1284 *p++ = cpu_to_be32(resp->p_name_max);
1285 p = xdr_encode_bool(p, resp->p_no_trunc);
1286 p = xdr_encode_bool(p, resp->p_chown_restricted);
1287 p = xdr_encode_bool(p, resp->p_case_insensitive);
1288 xdr_encode_bool(p, resp->p_case_preserving);
1297 struct nfsd3_pathconfres *resp = rqstp->rq_resp;
1299 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
1301 switch (resp->status) {
1305 if (!svcxdr_encode_pathconf3resok(xdr, resp))
1320 struct nfsd3_commitres *resp = rqstp->rq_resp;
1322 if (!svcxdr_encode_nfsstat3(xdr, resp->status))
1324 switch (resp->status) {
1326 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh))
1328 if (!svcxdr_encode_writeverf3(xdr, resp->verf))
1332 if (!svcxdr_encode_wcc_data(rqstp, xdr, &resp->fh))
1345 struct nfsd3_attrstat *resp = rqstp->rq_resp;
1347 fh_put(&resp->fh);
1353 struct nfsd3_fhandle_pair *resp = rqstp->rq_resp;
1355 fh_put(&resp->fh1);
1356 fh_put(&resp->fh2);