• Home
  • Raw
  • Download

Lines Matching +full:vp +full:- +full:p

1 // SPDX-License-Identifier: GPL-2.0-or-later
25 fid->vid = ntohl(*bp++); in xdr_decode_AFSFid()
26 fid->vnode = ntohl(*bp++); in xdr_decode_AFSFid()
27 fid->unique = ntohl(*bp++); in xdr_decode_AFSFid()
59 struct afs_file_status *status = &scb->status; in xdr_decode_AFSFetchStatus()
60 bool inline_error = (call->operation_ID == afs_FS_InlineBulkStatus); in xdr_decode_AFSFetchStatus()
64 abort_code = ntohl(xdr->abort_code); in xdr_decode_AFSFetchStatus()
66 if (xdr->if_version != htonl(AFS_FSTATUS_VERSION)) { in xdr_decode_AFSFetchStatus()
67 if (xdr->if_version == htonl(0) && in xdr_decode_AFSFetchStatus()
74 status->abort_code = abort_code; in xdr_decode_AFSFetchStatus()
75 scb->have_error = true; in xdr_decode_AFSFetchStatus()
79 pr_warn("Unknown AFSFetchStatus version %u\n", ntohl(xdr->if_version)); in xdr_decode_AFSFetchStatus()
84 status->abort_code = abort_code; in xdr_decode_AFSFetchStatus()
85 scb->have_error = true; in xdr_decode_AFSFetchStatus()
89 type = ntohl(xdr->type); in xdr_decode_AFSFetchStatus()
94 status->type = type; in xdr_decode_AFSFetchStatus()
100 status->nlink = ntohl(xdr->nlink); in xdr_decode_AFSFetchStatus()
101 status->author = ntohl(xdr->author); in xdr_decode_AFSFetchStatus()
102 status->owner = ntohl(xdr->owner); in xdr_decode_AFSFetchStatus()
103 status->caller_access = ntohl(xdr->caller_access); /* Ticket dependent */ in xdr_decode_AFSFetchStatus()
104 status->anon_access = ntohl(xdr->anon_access); in xdr_decode_AFSFetchStatus()
105 status->mode = ntohl(xdr->mode) & S_IALLUGO; in xdr_decode_AFSFetchStatus()
106 status->group = ntohl(xdr->group); in xdr_decode_AFSFetchStatus()
107 status->lock_count = ntohl(xdr->lock_count); in xdr_decode_AFSFetchStatus()
109 status->mtime_client.tv_sec = ntohl(xdr->mtime_client); in xdr_decode_AFSFetchStatus()
110 status->mtime_client.tv_nsec = 0; in xdr_decode_AFSFetchStatus()
111 status->mtime_server.tv_sec = ntohl(xdr->mtime_server); in xdr_decode_AFSFetchStatus()
112 status->mtime_server.tv_nsec = 0; in xdr_decode_AFSFetchStatus()
114 size = (u64)ntohl(xdr->size_lo); in xdr_decode_AFSFetchStatus()
115 size |= (u64)ntohl(xdr->size_hi) << 32; in xdr_decode_AFSFetchStatus()
116 status->size = size; in xdr_decode_AFSFetchStatus()
118 data_version = (u64)ntohl(xdr->data_version_lo); in xdr_decode_AFSFetchStatus()
119 data_version |= (u64)ntohl(xdr->data_version_hi) << 32; in xdr_decode_AFSFetchStatus()
120 status->data_version = data_version; in xdr_decode_AFSFetchStatus()
121 scb->have_status = true; in xdr_decode_AFSFetchStatus()
134 return ktime_divns(call->issue_time, NSEC_PER_SEC) + expiry; in xdr_decode_expiry()
141 struct afs_callback *cb = &scb->callback; in xdr_decode_AFSCallBack()
145 cb->expires_at = xdr_decode_expiry(call, ntohl(*bp++)); in xdr_decode_AFSCallBack()
147 scb->have_cb = true; in xdr_decode_AFSCallBack()
169 volsync->creation = creation; in xdr_decode_AFSVolSync()
181 if (attr->ia_valid & ATTR_MTIME) { in xdr_encode_AFS_StoreStatus()
183 mtime = attr->ia_mtime.tv_sec; in xdr_encode_AFS_StoreStatus()
186 if (attr->ia_valid & ATTR_UID) { in xdr_encode_AFS_StoreStatus()
188 owner = from_kuid(&init_user_ns, attr->ia_uid); in xdr_encode_AFS_StoreStatus()
191 if (attr->ia_valid & ATTR_GID) { in xdr_encode_AFS_StoreStatus()
193 group = from_kgid(&init_user_ns, attr->ia_gid); in xdr_encode_AFS_StoreStatus()
196 if (attr->ia_valid & ATTR_MODE) { in xdr_encode_AFS_StoreStatus()
198 mode = attr->ia_mode & S_IALLUGO; in xdr_encode_AFS_StoreStatus()
218 vs->vid = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
219 vs->parent_id = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
220 vs->online = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
221 vs->in_service = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
222 vs->blessed = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
223 vs->needs_salvage = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
224 vs->type = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
225 vs->min_quota = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
226 vs->max_quota = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
227 vs->blocks_in_use = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
228 vs->part_blocks_avail = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
229 vs->part_max_blocks = ntohl(*bp++); in xdr_decode_AFSFetchVolumeStatus()
230 vs->vol_copy_date = 0; in xdr_decode_AFSFetchVolumeStatus()
231 vs->vol_backup_date = 0; in xdr_decode_AFSFetchVolumeStatus()
240 struct afs_operation *op = call->op; in afs_deliver_fs_fetch_status()
241 struct afs_vnode_param *vp = &op->file[op->fetch_status.which]; in afs_deliver_fs_fetch_status() local
250 bp = call->buffer; in afs_deliver_fs_fetch_status()
251 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_fetch_status()
252 xdr_decode_AFSCallBack(&bp, call, &vp->scb); in afs_deliver_fs_fetch_status()
253 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_fetch_status()
274 struct afs_vnode_param *vp = &op->file[op->fetch_status.which]; in afs_fs_fetch_status() local
279 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_fetch_status()
281 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchStatus, in afs_fs_fetch_status()
287 bp = call->request; in afs_fs_fetch_status()
289 bp[1] = htonl(vp->fid.vid); in afs_fs_fetch_status()
290 bp[2] = htonl(vp->fid.vnode); in afs_fs_fetch_status()
291 bp[3] = htonl(vp->fid.unique); in afs_fs_fetch_status()
293 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_fetch_status()
302 struct afs_operation *op = call->op; in afs_deliver_fs_fetch_data()
303 struct afs_vnode_param *vp = &op->file[0]; in afs_deliver_fs_fetch_data() local
304 struct afs_read *req = op->fetch.req; in afs_deliver_fs_fetch_data()
309 call->unmarshall, call->iov_len, iov_iter_count(call->iter), in afs_deliver_fs_fetch_data()
310 req->actual_len); in afs_deliver_fs_fetch_data()
312 switch (call->unmarshall) { in afs_deliver_fs_fetch_data()
314 req->actual_len = 0; in afs_deliver_fs_fetch_data()
315 call->unmarshall++; in afs_deliver_fs_fetch_data()
316 if (call->operation_ID == FSFETCHDATA64) { in afs_deliver_fs_fetch_data()
319 call->tmp_u = htonl(0); in afs_deliver_fs_fetch_data()
325 * ->actual_len. This may indicate more or less data than was in afs_deliver_fs_fetch_data()
334 req->actual_len = be64_to_cpu(call->tmp64); in afs_deliver_fs_fetch_data()
335 _debug("DATA length: %llu", req->actual_len); in afs_deliver_fs_fetch_data()
337 if (req->actual_len == 0) in afs_deliver_fs_fetch_data()
340 call->iter = req->iter; in afs_deliver_fs_fetch_data()
341 call->iov_len = min(req->actual_len, req->len); in afs_deliver_fs_fetch_data()
342 call->unmarshall++; in afs_deliver_fs_fetch_data()
348 iov_iter_count(call->iter), req->actual_len); in afs_deliver_fs_fetch_data()
354 call->iter = &call->def_iter; in afs_deliver_fs_fetch_data()
355 if (req->actual_len <= req->len) in afs_deliver_fs_fetch_data()
359 afs_extract_discard(call, req->actual_len - req->len); in afs_deliver_fs_fetch_data()
360 call->unmarshall = 3; in afs_deliver_fs_fetch_data()
365 iov_iter_count(call->iter), req->actual_len - req->len); in afs_deliver_fs_fetch_data()
372 call->unmarshall = 4; in afs_deliver_fs_fetch_data()
382 bp = call->buffer; in afs_deliver_fs_fetch_data()
383 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_fetch_data()
384 xdr_decode_AFSCallBack(&bp, call, &vp->scb); in afs_deliver_fs_fetch_data()
385 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_fetch_data()
387 req->data_version = vp->scb.status.data_version; in afs_deliver_fs_fetch_data()
388 req->file_size = vp->scb.status.size; in afs_deliver_fs_fetch_data()
390 call->unmarshall++; in afs_deliver_fs_fetch_data()
423 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_fetch_data64() local
424 struct afs_read *req = op->fetch.req; in afs_fs_fetch_data64()
430 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchData64, 32, (21 + 3 + 6) * 4); in afs_fs_fetch_data64()
435 bp = call->request; in afs_fs_fetch_data64()
437 bp[1] = htonl(vp->fid.vid); in afs_fs_fetch_data64()
438 bp[2] = htonl(vp->fid.vnode); in afs_fs_fetch_data64()
439 bp[3] = htonl(vp->fid.unique); in afs_fs_fetch_data64()
440 bp[4] = htonl(upper_32_bits(req->pos)); in afs_fs_fetch_data64()
441 bp[5] = htonl(lower_32_bits(req->pos)); in afs_fs_fetch_data64()
443 bp[7] = htonl(lower_32_bits(req->len)); in afs_fs_fetch_data64()
445 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_fetch_data64()
454 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_fetch_data() local
456 struct afs_read *req = op->fetch.req; in afs_fs_fetch_data()
459 if (test_bit(AFS_SERVER_FL_HAS_FS64, &op->server->flags)) in afs_fs_fetch_data()
464 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchData, 24, (21 + 3 + 6) * 4); in afs_fs_fetch_data()
468 req->call_debug_id = call->debug_id; in afs_fs_fetch_data()
471 bp = call->request; in afs_fs_fetch_data()
473 bp[1] = htonl(vp->fid.vid); in afs_fs_fetch_data()
474 bp[2] = htonl(vp->fid.vnode); in afs_fs_fetch_data()
475 bp[3] = htonl(vp->fid.unique); in afs_fs_fetch_data()
476 bp[4] = htonl(lower_32_bits(req->pos)); in afs_fs_fetch_data()
477 bp[5] = htonl(lower_32_bits(req->len)); in afs_fs_fetch_data()
479 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_fetch_data()
488 struct afs_operation *op = call->op; in afs_deliver_fs_create_vnode()
489 struct afs_vnode_param *dvp = &op->file[0]; in afs_deliver_fs_create_vnode()
490 struct afs_vnode_param *vp = &op->file[1]; in afs_deliver_fs_create_vnode() local
499 bp = call->buffer; in afs_deliver_fs_create_vnode()
500 xdr_decode_AFSFid(&bp, &op->file[1].fid); in afs_deliver_fs_create_vnode()
501 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_create_vnode()
502 xdr_decode_AFSFetchStatus(&bp, call, &dvp->scb); in afs_deliver_fs_create_vnode()
503 xdr_decode_AFSCallBack(&bp, call, &vp->scb); in afs_deliver_fs_create_vnode()
504 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_create_vnode()
525 const struct qstr *name = &op->dentry->d_name; in afs_fs_create_file()
526 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_create_file()
533 namesz = name->len; in afs_fs_create_file()
534 padsz = (4 - (namesz & 3)) & 3; in afs_fs_create_file()
537 call = afs_alloc_flat_call(op->net, &afs_RXFSCreateFile, in afs_fs_create_file()
543 bp = call->request; in afs_fs_create_file()
545 *bp++ = htonl(dvp->fid.vid); in afs_fs_create_file()
546 *bp++ = htonl(dvp->fid.vnode); in afs_fs_create_file()
547 *bp++ = htonl(dvp->fid.unique); in afs_fs_create_file()
549 memcpy(bp, name->name, namesz); in afs_fs_create_file()
556 *bp++ = htonl(op->mtime.tv_sec); /* mtime */ in afs_fs_create_file()
559 *bp++ = htonl(op->create.mode & S_IALLUGO); /* unix mode */ in afs_fs_create_file()
562 trace_afs_make_fs_call1(call, &dvp->fid, name); in afs_fs_create_file()
578 const struct qstr *name = &op->dentry->d_name; in afs_fs_make_dir()
579 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_make_dir()
586 namesz = name->len; in afs_fs_make_dir()
587 padsz = (4 - (namesz & 3)) & 3; in afs_fs_make_dir()
590 call = afs_alloc_flat_call(op->net, &afs_RXFSMakeDir, in afs_fs_make_dir()
596 bp = call->request; in afs_fs_make_dir()
598 *bp++ = htonl(dvp->fid.vid); in afs_fs_make_dir()
599 *bp++ = htonl(dvp->fid.vnode); in afs_fs_make_dir()
600 *bp++ = htonl(dvp->fid.unique); in afs_fs_make_dir()
602 memcpy(bp, name->name, namesz); in afs_fs_make_dir()
609 *bp++ = htonl(op->mtime.tv_sec); /* mtime */ in afs_fs_make_dir()
612 *bp++ = htonl(op->create.mode & S_IALLUGO); /* unix mode */ in afs_fs_make_dir()
615 trace_afs_make_fs_call1(call, &dvp->fid, name); in afs_fs_make_dir()
624 struct afs_operation *op = call->op; in afs_deliver_fs_file_status_and_vol()
625 struct afs_vnode_param *vp = &op->file[0]; in afs_deliver_fs_file_status_and_vol() local
634 bp = call->buffer; in afs_deliver_fs_file_status_and_vol()
635 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_file_status_and_vol()
636 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_file_status_and_vol()
657 const struct qstr *name = &op->dentry->d_name; in afs_fs_remove_file()
658 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_remove_file()
665 namesz = name->len; in afs_fs_remove_file()
666 padsz = (4 - (namesz & 3)) & 3; in afs_fs_remove_file()
669 call = afs_alloc_flat_call(op->net, &afs_RXFSRemoveFile, in afs_fs_remove_file()
675 bp = call->request; in afs_fs_remove_file()
677 *bp++ = htonl(dvp->fid.vid); in afs_fs_remove_file()
678 *bp++ = htonl(dvp->fid.vnode); in afs_fs_remove_file()
679 *bp++ = htonl(dvp->fid.unique); in afs_fs_remove_file()
681 memcpy(bp, name->name, namesz); in afs_fs_remove_file()
688 trace_afs_make_fs_call1(call, &dvp->fid, name); in afs_fs_remove_file()
704 const struct qstr *name = &op->dentry->d_name; in afs_fs_remove_dir()
705 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_remove_dir()
712 namesz = name->len; in afs_fs_remove_dir()
713 padsz = (4 - (namesz & 3)) & 3; in afs_fs_remove_dir()
716 call = afs_alloc_flat_call(op->net, &afs_RXFSRemoveDir, in afs_fs_remove_dir()
722 bp = call->request; in afs_fs_remove_dir()
724 *bp++ = htonl(dvp->fid.vid); in afs_fs_remove_dir()
725 *bp++ = htonl(dvp->fid.vnode); in afs_fs_remove_dir()
726 *bp++ = htonl(dvp->fid.unique); in afs_fs_remove_dir()
728 memcpy(bp, name->name, namesz); in afs_fs_remove_dir()
735 trace_afs_make_fs_call1(call, &dvp->fid, name); in afs_fs_remove_dir()
744 struct afs_operation *op = call->op; in afs_deliver_fs_link()
745 struct afs_vnode_param *dvp = &op->file[0]; in afs_deliver_fs_link()
746 struct afs_vnode_param *vp = &op->file[1]; in afs_deliver_fs_link() local
750 _enter("{%u}", call->unmarshall); in afs_deliver_fs_link()
757 bp = call->buffer; in afs_deliver_fs_link()
758 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_link()
759 xdr_decode_AFSFetchStatus(&bp, call, &dvp->scb); in afs_deliver_fs_link()
760 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_link()
781 const struct qstr *name = &op->dentry->d_name; in afs_fs_link()
782 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_link()
783 struct afs_vnode_param *vp = &op->file[1]; in afs_fs_link() local
790 namesz = name->len; in afs_fs_link()
791 padsz = (4 - (namesz & 3)) & 3; in afs_fs_link()
794 call = afs_alloc_flat_call(op->net, &afs_RXFSLink, reqsz, (21 + 21 + 6) * 4); in afs_fs_link()
799 bp = call->request; in afs_fs_link()
801 *bp++ = htonl(dvp->fid.vid); in afs_fs_link()
802 *bp++ = htonl(dvp->fid.vnode); in afs_fs_link()
803 *bp++ = htonl(dvp->fid.unique); in afs_fs_link()
805 memcpy(bp, name->name, namesz); in afs_fs_link()
811 *bp++ = htonl(vp->fid.vid); in afs_fs_link()
812 *bp++ = htonl(vp->fid.vnode); in afs_fs_link()
813 *bp++ = htonl(vp->fid.unique); in afs_fs_link()
815 trace_afs_make_fs_call1(call, &vp->fid, name); in afs_fs_link()
824 struct afs_operation *op = call->op; in afs_deliver_fs_symlink()
825 struct afs_vnode_param *dvp = &op->file[0]; in afs_deliver_fs_symlink()
826 struct afs_vnode_param *vp = &op->file[1]; in afs_deliver_fs_symlink() local
830 _enter("{%u}", call->unmarshall); in afs_deliver_fs_symlink()
837 bp = call->buffer; in afs_deliver_fs_symlink()
838 xdr_decode_AFSFid(&bp, &vp->fid); in afs_deliver_fs_symlink()
839 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_symlink()
840 xdr_decode_AFSFetchStatus(&bp, call, &dvp->scb); in afs_deliver_fs_symlink()
841 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_symlink()
862 const struct qstr *name = &op->dentry->d_name; in afs_fs_symlink()
863 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_symlink()
870 namesz = name->len; in afs_fs_symlink()
871 padsz = (4 - (namesz & 3)) & 3; in afs_fs_symlink()
873 c_namesz = strlen(op->create.symlink); in afs_fs_symlink()
874 c_padsz = (4 - (c_namesz & 3)) & 3; in afs_fs_symlink()
878 call = afs_alloc_flat_call(op->net, &afs_RXFSSymlink, reqsz, in afs_fs_symlink()
884 bp = call->request; in afs_fs_symlink()
886 *bp++ = htonl(dvp->fid.vid); in afs_fs_symlink()
887 *bp++ = htonl(dvp->fid.vnode); in afs_fs_symlink()
888 *bp++ = htonl(dvp->fid.unique); in afs_fs_symlink()
890 memcpy(bp, name->name, namesz); in afs_fs_symlink()
897 memcpy(bp, op->create.symlink, c_namesz); in afs_fs_symlink()
904 *bp++ = htonl(op->mtime.tv_sec); /* mtime */ in afs_fs_symlink()
910 trace_afs_make_fs_call1(call, &dvp->fid, name); in afs_fs_symlink()
919 struct afs_operation *op = call->op; in afs_deliver_fs_rename()
920 struct afs_vnode_param *orig_dvp = &op->file[0]; in afs_deliver_fs_rename()
921 struct afs_vnode_param *new_dvp = &op->file[1]; in afs_deliver_fs_rename()
929 bp = call->buffer; in afs_deliver_fs_rename()
933 xdr_decode_AFSFetchStatus(&bp, call, &orig_dvp->scb); in afs_deliver_fs_rename()
934 xdr_decode_AFSFetchStatus(&bp, call, &new_dvp->scb); in afs_deliver_fs_rename()
935 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_rename()
956 struct afs_vnode_param *orig_dvp = &op->file[0]; in afs_fs_rename()
957 struct afs_vnode_param *new_dvp = &op->file[1]; in afs_fs_rename()
958 const struct qstr *orig_name = &op->dentry->d_name; in afs_fs_rename()
959 const struct qstr *new_name = &op->dentry_2->d_name; in afs_fs_rename()
966 o_namesz = orig_name->len; in afs_fs_rename()
967 o_padsz = (4 - (o_namesz & 3)) & 3; in afs_fs_rename()
969 n_namesz = new_name->len; in afs_fs_rename()
970 n_padsz = (4 - (n_namesz & 3)) & 3; in afs_fs_rename()
977 call = afs_alloc_flat_call(op->net, &afs_RXFSRename, reqsz, (21 + 21 + 6) * 4); in afs_fs_rename()
982 bp = call->request; in afs_fs_rename()
984 *bp++ = htonl(orig_dvp->fid.vid); in afs_fs_rename()
985 *bp++ = htonl(orig_dvp->fid.vnode); in afs_fs_rename()
986 *bp++ = htonl(orig_dvp->fid.unique); in afs_fs_rename()
988 memcpy(bp, orig_name->name, o_namesz); in afs_fs_rename()
995 *bp++ = htonl(new_dvp->fid.vid); in afs_fs_rename()
996 *bp++ = htonl(new_dvp->fid.vnode); in afs_fs_rename()
997 *bp++ = htonl(new_dvp->fid.unique); in afs_fs_rename()
999 memcpy(bp, new_name->name, n_namesz); in afs_fs_rename()
1006 trace_afs_make_fs_call2(call, &orig_dvp->fid, orig_name, new_name); in afs_fs_rename()
1015 struct afs_operation *op = call->op; in afs_deliver_fs_store_data()
1016 struct afs_vnode_param *vp = &op->file[0]; in afs_deliver_fs_store_data() local
1027 bp = call->buffer; in afs_deliver_fs_store_data()
1028 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_store_data()
1029 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_store_data()
1057 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_store_data64() local
1062 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_store_data64()
1064 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData64, in afs_fs_store_data64()
1070 call->write_iter = op->store.write_iter; in afs_fs_store_data64()
1073 bp = call->request; in afs_fs_store_data64()
1075 *bp++ = htonl(vp->fid.vid); in afs_fs_store_data64()
1076 *bp++ = htonl(vp->fid.vnode); in afs_fs_store_data64()
1077 *bp++ = htonl(vp->fid.unique); in afs_fs_store_data64()
1080 *bp++ = htonl(op->mtime.tv_sec); /* mtime */ in afs_fs_store_data64()
1086 *bp++ = htonl(upper_32_bits(op->store.pos)); in afs_fs_store_data64()
1087 *bp++ = htonl(lower_32_bits(op->store.pos)); in afs_fs_store_data64()
1088 *bp++ = htonl(upper_32_bits(op->store.size)); in afs_fs_store_data64()
1089 *bp++ = htonl(lower_32_bits(op->store.size)); in afs_fs_store_data64()
1090 *bp++ = htonl(upper_32_bits(op->store.i_size)); in afs_fs_store_data64()
1091 *bp++ = htonl(lower_32_bits(op->store.i_size)); in afs_fs_store_data64()
1093 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_store_data64()
1102 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_store_data() local
1107 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_store_data()
1110 (unsigned long long)op->store.size, in afs_fs_store_data()
1111 (unsigned long long)op->store.pos, in afs_fs_store_data()
1112 (unsigned long long)op->store.i_size); in afs_fs_store_data()
1114 if (test_bit(AFS_SERVER_FL_HAS_FS64, &op->server->flags)) in afs_fs_store_data()
1117 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData, in afs_fs_store_data()
1123 call->write_iter = op->store.write_iter; in afs_fs_store_data()
1126 bp = call->request; in afs_fs_store_data()
1128 *bp++ = htonl(vp->fid.vid); in afs_fs_store_data()
1129 *bp++ = htonl(vp->fid.vnode); in afs_fs_store_data()
1130 *bp++ = htonl(vp->fid.unique); in afs_fs_store_data()
1133 *bp++ = htonl(op->mtime.tv_sec); /* mtime */ in afs_fs_store_data()
1139 *bp++ = htonl(lower_32_bits(op->store.pos)); in afs_fs_store_data()
1140 *bp++ = htonl(lower_32_bits(op->store.size)); in afs_fs_store_data()
1141 *bp++ = htonl(lower_32_bits(op->store.i_size)); in afs_fs_store_data()
1143 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_store_data()
1177 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_setattr_size64() local
1179 struct iattr *attr = op->setattr.attr; in afs_fs_setattr_size64()
1183 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_setattr_size64()
1185 ASSERT(attr->ia_valid & ATTR_SIZE); in afs_fs_setattr_size64()
1187 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData64_as_Status, in afs_fs_setattr_size64()
1194 bp = call->request; in afs_fs_setattr_size64()
1196 *bp++ = htonl(vp->fid.vid); in afs_fs_setattr_size64()
1197 *bp++ = htonl(vp->fid.vnode); in afs_fs_setattr_size64()
1198 *bp++ = htonl(vp->fid.unique); in afs_fs_setattr_size64()
1202 *bp++ = htonl(upper_32_bits(attr->ia_size)); /* position of start of write */ in afs_fs_setattr_size64()
1203 *bp++ = htonl(lower_32_bits(attr->ia_size)); in afs_fs_setattr_size64()
1206 *bp++ = htonl(upper_32_bits(attr->ia_size)); /* new file length */ in afs_fs_setattr_size64()
1207 *bp++ = htonl(lower_32_bits(attr->ia_size)); in afs_fs_setattr_size64()
1209 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_setattr_size64()
1219 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_setattr_size() local
1221 struct iattr *attr = op->setattr.attr; in afs_fs_setattr_size()
1225 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_setattr_size()
1227 ASSERT(attr->ia_valid & ATTR_SIZE); in afs_fs_setattr_size()
1228 if (test_bit(AFS_SERVER_FL_HAS_FS64, &op->server->flags)) in afs_fs_setattr_size()
1231 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData_as_Status, in afs_fs_setattr_size()
1238 bp = call->request; in afs_fs_setattr_size()
1240 *bp++ = htonl(vp->fid.vid); in afs_fs_setattr_size()
1241 *bp++ = htonl(vp->fid.vnode); in afs_fs_setattr_size()
1242 *bp++ = htonl(vp->fid.unique); in afs_fs_setattr_size()
1246 *bp++ = htonl(attr->ia_size); /* position of start of write */ in afs_fs_setattr_size()
1248 *bp++ = htonl(attr->ia_size); /* new file length */ in afs_fs_setattr_size()
1250 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_setattr_size()
1260 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_setattr() local
1262 struct iattr *attr = op->setattr.attr; in afs_fs_setattr()
1265 if (attr->ia_valid & ATTR_SIZE) in afs_fs_setattr()
1269 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_setattr()
1271 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreStatus, in afs_fs_setattr()
1278 bp = call->request; in afs_fs_setattr()
1280 *bp++ = htonl(vp->fid.vid); in afs_fs_setattr()
1281 *bp++ = htonl(vp->fid.vnode); in afs_fs_setattr()
1282 *bp++ = htonl(vp->fid.unique); in afs_fs_setattr()
1284 xdr_encode_AFS_StoreStatus(&bp, op->setattr.attr); in afs_fs_setattr()
1286 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_setattr()
1295 struct afs_operation *op = call->op; in afs_deliver_fs_get_volume_status()
1297 char *p; in afs_deliver_fs_get_volume_status() local
1301 _enter("{%u}", call->unmarshall); in afs_deliver_fs_get_volume_status()
1303 switch (call->unmarshall) { in afs_deliver_fs_get_volume_status()
1305 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1316 bp = call->buffer; in afs_deliver_fs_get_volume_status()
1317 xdr_decode_AFSFetchVolumeStatus(&bp, &op->volstatus.vs); in afs_deliver_fs_get_volume_status()
1318 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1328 call->count = ntohl(call->tmp); in afs_deliver_fs_get_volume_status()
1329 _debug("volname length: %u", call->count); in afs_deliver_fs_get_volume_status()
1330 if (call->count >= AFSNAMEMAX) in afs_deliver_fs_get_volume_status()
1332 size = (call->count + 3) & ~3; /* It's padded */ in afs_deliver_fs_get_volume_status()
1334 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1344 p = call->buffer; in afs_deliver_fs_get_volume_status()
1345 p[call->count] = 0; in afs_deliver_fs_get_volume_status()
1346 _debug("volname '%s'", p); in afs_deliver_fs_get_volume_status()
1348 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1357 call->count = ntohl(call->tmp); in afs_deliver_fs_get_volume_status()
1358 _debug("offline msg length: %u", call->count); in afs_deliver_fs_get_volume_status()
1359 if (call->count >= AFSNAMEMAX) in afs_deliver_fs_get_volume_status()
1361 size = (call->count + 3) & ~3; /* It's padded */ in afs_deliver_fs_get_volume_status()
1363 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1373 p = call->buffer; in afs_deliver_fs_get_volume_status()
1374 p[call->count] = 0; in afs_deliver_fs_get_volume_status()
1375 _debug("offline '%s'", p); in afs_deliver_fs_get_volume_status()
1378 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1387 call->count = ntohl(call->tmp); in afs_deliver_fs_get_volume_status()
1388 _debug("motd length: %u", call->count); in afs_deliver_fs_get_volume_status()
1389 if (call->count >= AFSNAMEMAX) in afs_deliver_fs_get_volume_status()
1391 size = (call->count + 3) & ~3; /* It's padded */ in afs_deliver_fs_get_volume_status()
1393 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1403 p = call->buffer; in afs_deliver_fs_get_volume_status()
1404 p[call->count] = 0; in afs_deliver_fs_get_volume_status()
1405 _debug("motd '%s'", p); in afs_deliver_fs_get_volume_status()
1407 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1433 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_get_volume_status() local
1439 call = afs_alloc_flat_call(op->net, &afs_RXFSGetVolumeStatus, 2 * 4, in afs_fs_get_volume_status()
1445 bp = call->request; in afs_fs_get_volume_status()
1447 bp[1] = htonl(vp->fid.vid); in afs_fs_get_volume_status()
1449 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_get_volume_status()
1458 struct afs_operation *op = call->op; in afs_deliver_fs_xxxx_lock()
1462 _enter("{%u}", call->unmarshall); in afs_deliver_fs_xxxx_lock()
1469 bp = call->buffer; in afs_deliver_fs_xxxx_lock()
1470 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_xxxx_lock()
1513 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_set_lock() local
1519 call = afs_alloc_flat_call(op->net, &afs_RXFSSetLock, 5 * 4, 6 * 4); in afs_fs_set_lock()
1524 bp = call->request; in afs_fs_set_lock()
1526 *bp++ = htonl(vp->fid.vid); in afs_fs_set_lock()
1527 *bp++ = htonl(vp->fid.vnode); in afs_fs_set_lock()
1528 *bp++ = htonl(vp->fid.unique); in afs_fs_set_lock()
1529 *bp++ = htonl(op->lock.type); in afs_fs_set_lock()
1531 trace_afs_make_fs_calli(call, &vp->fid, op->lock.type); in afs_fs_set_lock()
1540 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_extend_lock() local
1546 call = afs_alloc_flat_call(op->net, &afs_RXFSExtendLock, 4 * 4, 6 * 4); in afs_fs_extend_lock()
1551 bp = call->request; in afs_fs_extend_lock()
1553 *bp++ = htonl(vp->fid.vid); in afs_fs_extend_lock()
1554 *bp++ = htonl(vp->fid.vnode); in afs_fs_extend_lock()
1555 *bp++ = htonl(vp->fid.unique); in afs_fs_extend_lock()
1557 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_extend_lock()
1566 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_release_lock() local
1572 call = afs_alloc_flat_call(op->net, &afs_RXFSReleaseLock, 4 * 4, 6 * 4); in afs_fs_release_lock()
1577 bp = call->request; in afs_fs_release_lock()
1579 *bp++ = htonl(vp->fid.vid); in afs_fs_release_lock()
1580 *bp++ = htonl(vp->fid.vnode); in afs_fs_release_lock()
1581 *bp++ = htonl(vp->fid.unique); in afs_fs_release_lock()
1583 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_release_lock()
1620 return -ENOMEM; in afs_fs_give_up_all_callbacks()
1622 call->key = key; in afs_fs_give_up_all_callbacks()
1625 bp = call->request; in afs_fs_give_up_all_callbacks()
1628 call->server = afs_use_server(server, afs_server_trace_give_up_cb); in afs_fs_give_up_all_callbacks()
1641 _enter("{%u,%zu}", call->unmarshall, iov_iter_count(call->iter)); in afs_deliver_fs_get_capabilities()
1643 switch (call->unmarshall) { in afs_deliver_fs_get_capabilities()
1646 call->unmarshall++; in afs_deliver_fs_get_capabilities()
1655 count = ntohl(call->tmp); in afs_deliver_fs_get_capabilities()
1656 call->count = count; in afs_deliver_fs_get_capabilities()
1657 call->count2 = count; in afs_deliver_fs_get_capabilities()
1659 call->unmarshall = 4; in afs_deliver_fs_get_capabilities()
1660 call->tmp = 0; in afs_deliver_fs_get_capabilities()
1664 /* Extract the first word of the capabilities to call->tmp */ in afs_deliver_fs_get_capabilities()
1666 call->unmarshall++; in afs_deliver_fs_get_capabilities()
1674 afs_extract_discard(call, (count - 1) * sizeof(__be32)); in afs_deliver_fs_get_capabilities()
1675 call->unmarshall++; in afs_deliver_fs_get_capabilities()
1684 call->unmarshall++; in afs_deliver_fs_get_capabilities()
1707 * ->done() - otherwise we return false to indicate we didn't even try.
1721 call->key = key; in afs_fs_get_capabilities()
1722 call->server = afs_use_server(server, afs_server_trace_get_caps); in afs_fs_get_capabilities()
1723 call->upgrade = true; in afs_fs_get_capabilities()
1724 call->async = true; in afs_fs_get_capabilities()
1725 call->max_lifespan = AFS_PROBE_MAX_LIFESPAN; in afs_fs_get_capabilities()
1728 bp = call->request; in afs_fs_get_capabilities()
1742 struct afs_operation *op = call->op; in afs_deliver_fs_inline_bulk_status()
1748 _enter("{%u}", call->unmarshall); in afs_deliver_fs_inline_bulk_status()
1750 switch (call->unmarshall) { in afs_deliver_fs_inline_bulk_status()
1753 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1763 tmp = ntohl(call->tmp); in afs_deliver_fs_inline_bulk_status()
1764 _debug("status count: %u/%u", tmp, op->nr_files); in afs_deliver_fs_inline_bulk_status()
1765 if (tmp != op->nr_files) in afs_deliver_fs_inline_bulk_status()
1768 call->count = 0; in afs_deliver_fs_inline_bulk_status()
1769 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1775 _debug("extract status array %u", call->count); in afs_deliver_fs_inline_bulk_status()
1780 switch (call->count) { in afs_deliver_fs_inline_bulk_status()
1782 scb = &op->file[0].scb; in afs_deliver_fs_inline_bulk_status()
1785 scb = &op->file[1].scb; in afs_deliver_fs_inline_bulk_status()
1788 scb = &op->more_files[call->count - 2].scb; in afs_deliver_fs_inline_bulk_status()
1792 bp = call->buffer; in afs_deliver_fs_inline_bulk_status()
1795 call->count++; in afs_deliver_fs_inline_bulk_status()
1796 if (call->count < op->nr_files) in afs_deliver_fs_inline_bulk_status()
1799 call->count = 0; in afs_deliver_fs_inline_bulk_status()
1800 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1811 tmp = ntohl(call->tmp); in afs_deliver_fs_inline_bulk_status()
1813 if (tmp != op->nr_files) in afs_deliver_fs_inline_bulk_status()
1815 call->count = 0; in afs_deliver_fs_inline_bulk_status()
1816 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1828 switch (call->count) { in afs_deliver_fs_inline_bulk_status()
1830 scb = &op->file[0].scb; in afs_deliver_fs_inline_bulk_status()
1833 scb = &op->file[1].scb; in afs_deliver_fs_inline_bulk_status()
1836 scb = &op->more_files[call->count - 2].scb; in afs_deliver_fs_inline_bulk_status()
1840 bp = call->buffer; in afs_deliver_fs_inline_bulk_status()
1842 call->count++; in afs_deliver_fs_inline_bulk_status()
1843 if (call->count < op->nr_files) in afs_deliver_fs_inline_bulk_status()
1847 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1855 bp = call->buffer; in afs_deliver_fs_inline_bulk_status()
1856 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_inline_bulk_status()
1858 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1871 if (call->error == -ECONNABORTED && in afs_done_fs_inline_bulk_status()
1872 call->abort_code == RX_INVALID_OPERATION) { in afs_done_fs_inline_bulk_status()
1873 set_bit(AFS_SERVER_FL_NO_IBULK, &call->server->flags); in afs_done_fs_inline_bulk_status()
1874 if (call->op) in afs_done_fs_inline_bulk_status()
1875 set_bit(AFS_VOLUME_MAYBE_NO_IBULK, &call->op->volume->flags); in afs_done_fs_inline_bulk_status()
1895 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_inline_bulk_status()
1896 struct afs_vnode_param *vp = &op->file[1]; in afs_fs_inline_bulk_status() local
1901 if (test_bit(AFS_SERVER_FL_NO_IBULK, &op->server->flags)) { in afs_fs_inline_bulk_status()
1902 op->error = -ENOTSUPP; in afs_fs_inline_bulk_status()
1907 key_serial(op->key), vp->fid.vid, vp->fid.vnode, op->nr_files); in afs_fs_inline_bulk_status()
1909 call = afs_alloc_flat_call(op->net, &afs_RXFSInlineBulkStatus, in afs_fs_inline_bulk_status()
1910 (2 + op->nr_files * 3) * 4, in afs_fs_inline_bulk_status()
1916 bp = call->request; in afs_fs_inline_bulk_status()
1918 *bp++ = htonl(op->nr_files); in afs_fs_inline_bulk_status()
1919 *bp++ = htonl(dvp->fid.vid); in afs_fs_inline_bulk_status()
1920 *bp++ = htonl(dvp->fid.vnode); in afs_fs_inline_bulk_status()
1921 *bp++ = htonl(dvp->fid.unique); in afs_fs_inline_bulk_status()
1922 *bp++ = htonl(vp->fid.vid); in afs_fs_inline_bulk_status()
1923 *bp++ = htonl(vp->fid.vnode); in afs_fs_inline_bulk_status()
1924 *bp++ = htonl(vp->fid.unique); in afs_fs_inline_bulk_status()
1925 for (i = 0; i < op->nr_files - 2; i++) { in afs_fs_inline_bulk_status()
1926 *bp++ = htonl(op->more_files[i].fid.vid); in afs_fs_inline_bulk_status()
1927 *bp++ = htonl(op->more_files[i].fid.vnode); in afs_fs_inline_bulk_status()
1928 *bp++ = htonl(op->more_files[i].fid.unique); in afs_fs_inline_bulk_status()
1931 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_inline_bulk_status()
1940 struct afs_operation *op = call->op; in afs_deliver_fs_fetch_acl()
1941 struct afs_vnode_param *vp = &op->file[0]; in afs_deliver_fs_fetch_acl() local
1947 _enter("{%u}", call->unmarshall); in afs_deliver_fs_fetch_acl()
1949 switch (call->unmarshall) { in afs_deliver_fs_fetch_acl()
1952 call->unmarshall++; in afs_deliver_fs_fetch_acl()
1961 size = call->count2 = ntohl(call->tmp); in afs_deliver_fs_fetch_acl()
1966 return -ENOMEM; in afs_deliver_fs_fetch_acl()
1967 op->acl = acl; in afs_deliver_fs_fetch_acl()
1968 acl->size = call->count2; in afs_deliver_fs_fetch_acl()
1969 afs_extract_begin(call, acl->data, size); in afs_deliver_fs_fetch_acl()
1970 call->unmarshall++; in afs_deliver_fs_fetch_acl()
1980 call->unmarshall++; in afs_deliver_fs_fetch_acl()
1989 bp = call->buffer; in afs_deliver_fs_fetch_acl()
1990 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_fetch_acl()
1991 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_fetch_acl()
1993 call->unmarshall++; in afs_deliver_fs_fetch_acl()
2018 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_fetch_acl() local
2023 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_fetch_acl()
2025 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchACL, 16, (21 + 6) * 4); in afs_fs_fetch_acl()
2030 bp = call->request; in afs_fs_fetch_acl()
2032 bp[1] = htonl(vp->fid.vid); in afs_fs_fetch_acl()
2033 bp[2] = htonl(vp->fid.vnode); in afs_fs_fetch_acl()
2034 bp[3] = htonl(vp->fid.unique); in afs_fs_fetch_acl()
2036 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_fetch_acl()
2055 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_store_acl() local
2057 const struct afs_acl *acl = op->acl; in afs_fs_store_acl()
2062 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_store_acl()
2064 size = round_up(acl->size, 4); in afs_fs_store_acl()
2065 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreACL, in afs_fs_store_acl()
2071 bp = call->request; in afs_fs_store_acl()
2073 bp[1] = htonl(vp->fid.vid); in afs_fs_store_acl()
2074 bp[2] = htonl(vp->fid.vnode); in afs_fs_store_acl()
2075 bp[3] = htonl(vp->fid.unique); in afs_fs_store_acl()
2076 bp[4] = htonl(acl->size); in afs_fs_store_acl()
2077 memcpy(&bp[5], acl->data, acl->size); in afs_fs_store_acl()
2078 if (acl->size != size) in afs_fs_store_acl()
2079 memset((void *)&bp[5] + acl->size, 0, size - acl->size); in afs_fs_store_acl()
2081 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_store_acl()