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 call->fid = vp->fid; in afs_fs_fetch_status()
294 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_fetch_status()
303 struct afs_operation *op = call->op; in afs_deliver_fs_fetch_data()
304 struct netfs_io_subrequest *subreq = op->fetch.subreq; in afs_deliver_fs_fetch_data()
305 struct afs_vnode_param *vp = &op->file[0]; in afs_deliver_fs_fetch_data() local
311 call->unmarshall, call->iov_len, iov_iter_count(call->iter), in afs_deliver_fs_fetch_data()
312 call->remaining); in afs_deliver_fs_fetch_data()
314 switch (call->unmarshall) { in afs_deliver_fs_fetch_data()
316 call->remaining = 0; in afs_deliver_fs_fetch_data()
317 call->unmarshall++; in afs_deliver_fs_fetch_data()
318 if (call->operation_ID == FSFETCHDATA64) { in afs_deliver_fs_fetch_data()
321 call->tmp_u = htonl(0); in afs_deliver_fs_fetch_data()
326 /* Extract the returned data length into ->remaining. in afs_deliver_fs_fetch_data()
336 call->remaining = be64_to_cpu(call->tmp64); in afs_deliver_fs_fetch_data()
337 _debug("DATA length: %llu", call->remaining); in afs_deliver_fs_fetch_data()
339 if (call->remaining == 0) in afs_deliver_fs_fetch_data()
342 call->iter = &subreq->io_iter; in afs_deliver_fs_fetch_data()
343 call->iov_len = umin(call->remaining, subreq->len - subreq->transferred); in afs_deliver_fs_fetch_data()
344 call->unmarshall++; in afs_deliver_fs_fetch_data()
349 count_before = call->iov_len; in afs_deliver_fs_fetch_data()
350 _debug("extract data %zu/%llu", count_before, call->remaining); in afs_deliver_fs_fetch_data()
353 subreq->transferred += count_before - call->iov_len; in afs_deliver_fs_fetch_data()
354 call->remaining -= count_before - call->iov_len; in afs_deliver_fs_fetch_data()
358 call->iter = &call->def_iter; in afs_deliver_fs_fetch_data()
359 if (call->remaining) in afs_deliver_fs_fetch_data()
363 afs_extract_discard(call, call->remaining); in afs_deliver_fs_fetch_data()
364 call->unmarshall = 3; in afs_deliver_fs_fetch_data()
369 iov_iter_count(call->iter), call->remaining); in afs_deliver_fs_fetch_data()
376 call->unmarshall = 4; in afs_deliver_fs_fetch_data()
386 bp = call->buffer; in afs_deliver_fs_fetch_data()
387 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_fetch_data()
388 xdr_decode_AFSCallBack(&bp, call, &vp->scb); in afs_deliver_fs_fetch_data()
389 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_fetch_data()
391 if (subreq->start + subreq->transferred >= vp->scb.status.size) in afs_deliver_fs_fetch_data()
392 __set_bit(NETFS_SREQ_HIT_EOF, &subreq->flags); in afs_deliver_fs_fetch_data()
394 call->unmarshall++; in afs_deliver_fs_fetch_data()
431 struct netfs_io_subrequest *subreq = op->fetch.subreq; in afs_fs_fetch_data64()
432 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_fetch_data64() local
438 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchData64, 32, (21 + 3 + 6) * 4); in afs_fs_fetch_data64()
442 if (op->flags & AFS_OPERATION_ASYNC) in afs_fs_fetch_data64()
443 call->async = true; in afs_fs_fetch_data64()
446 bp = call->request; in afs_fs_fetch_data64()
448 bp[1] = htonl(vp->fid.vid); in afs_fs_fetch_data64()
449 bp[2] = htonl(vp->fid.vnode); in afs_fs_fetch_data64()
450 bp[3] = htonl(vp->fid.unique); in afs_fs_fetch_data64()
451 bp[4] = htonl(upper_32_bits(subreq->start + subreq->transferred)); in afs_fs_fetch_data64()
452 bp[5] = htonl(lower_32_bits(subreq->start + subreq->transferred)); in afs_fs_fetch_data64()
454 bp[7] = htonl(lower_32_bits(subreq->len - subreq->transferred)); in afs_fs_fetch_data64()
456 call->fid = vp->fid; in afs_fs_fetch_data64()
457 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_fetch_data64()
466 struct netfs_io_subrequest *subreq = op->fetch.subreq; in afs_fs_fetch_data()
467 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_fetch_data() local
471 if (test_bit(AFS_SERVER_FL_HAS_FS64, &op->server->flags)) in afs_fs_fetch_data()
476 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchData, 24, (21 + 3 + 6) * 4); in afs_fs_fetch_data()
481 bp = call->request; in afs_fs_fetch_data()
483 bp[1] = htonl(vp->fid.vid); in afs_fs_fetch_data()
484 bp[2] = htonl(vp->fid.vnode); in afs_fs_fetch_data()
485 bp[3] = htonl(vp->fid.unique); in afs_fs_fetch_data()
486 bp[4] = htonl(lower_32_bits(subreq->start + subreq->transferred)); in afs_fs_fetch_data()
487 bp[5] = htonl(lower_32_bits(subreq->len + subreq->transferred)); in afs_fs_fetch_data()
489 call->fid = vp->fid; in afs_fs_fetch_data()
490 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_fetch_data()
499 struct afs_operation *op = call->op; in afs_deliver_fs_create_vnode()
500 struct afs_vnode_param *dvp = &op->file[0]; in afs_deliver_fs_create_vnode()
501 struct afs_vnode_param *vp = &op->file[1]; in afs_deliver_fs_create_vnode() local
510 bp = call->buffer; in afs_deliver_fs_create_vnode()
511 xdr_decode_AFSFid(&bp, &op->file[1].fid); in afs_deliver_fs_create_vnode()
512 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_create_vnode()
513 xdr_decode_AFSFetchStatus(&bp, call, &dvp->scb); in afs_deliver_fs_create_vnode()
514 xdr_decode_AFSCallBack(&bp, call, &vp->scb); in afs_deliver_fs_create_vnode()
515 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_create_vnode()
536 const struct qstr *name = &op->dentry->d_name; in afs_fs_create_file()
537 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_create_file()
544 namesz = name->len; in afs_fs_create_file()
545 padsz = (4 - (namesz & 3)) & 3; in afs_fs_create_file()
548 call = afs_alloc_flat_call(op->net, &afs_RXFSCreateFile, in afs_fs_create_file()
554 bp = call->request; in afs_fs_create_file()
556 *bp++ = htonl(dvp->fid.vid); in afs_fs_create_file()
557 *bp++ = htonl(dvp->fid.vnode); in afs_fs_create_file()
558 *bp++ = htonl(dvp->fid.unique); in afs_fs_create_file()
560 memcpy(bp, name->name, namesz); in afs_fs_create_file()
567 *bp++ = htonl(op->mtime.tv_sec); /* mtime */ in afs_fs_create_file()
570 *bp++ = htonl(op->create.mode & S_IALLUGO); /* unix mode */ in afs_fs_create_file()
573 call->fid = dvp->fid; in afs_fs_create_file()
574 trace_afs_make_fs_call1(call, &dvp->fid, name); in afs_fs_create_file()
590 const struct qstr *name = &op->dentry->d_name; in afs_fs_make_dir()
591 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_make_dir()
598 namesz = name->len; in afs_fs_make_dir()
599 padsz = (4 - (namesz & 3)) & 3; in afs_fs_make_dir()
602 call = afs_alloc_flat_call(op->net, &afs_RXFSMakeDir, in afs_fs_make_dir()
608 bp = call->request; in afs_fs_make_dir()
610 *bp++ = htonl(dvp->fid.vid); in afs_fs_make_dir()
611 *bp++ = htonl(dvp->fid.vnode); in afs_fs_make_dir()
612 *bp++ = htonl(dvp->fid.unique); in afs_fs_make_dir()
614 memcpy(bp, name->name, namesz); in afs_fs_make_dir()
621 *bp++ = htonl(op->mtime.tv_sec); /* mtime */ in afs_fs_make_dir()
624 *bp++ = htonl(op->create.mode & S_IALLUGO); /* unix mode */ in afs_fs_make_dir()
627 call->fid = dvp->fid; in afs_fs_make_dir()
628 trace_afs_make_fs_call1(call, &dvp->fid, name); in afs_fs_make_dir()
637 struct afs_operation *op = call->op; in afs_deliver_fs_file_status_and_vol()
638 struct afs_vnode_param *vp = &op->file[0]; in afs_deliver_fs_file_status_and_vol() local
647 bp = call->buffer; in afs_deliver_fs_file_status_and_vol()
648 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_file_status_and_vol()
649 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_file_status_and_vol()
670 const struct qstr *name = &op->dentry->d_name; in afs_fs_remove_file()
671 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_remove_file()
678 namesz = name->len; in afs_fs_remove_file()
679 padsz = (4 - (namesz & 3)) & 3; in afs_fs_remove_file()
682 call = afs_alloc_flat_call(op->net, &afs_RXFSRemoveFile, in afs_fs_remove_file()
688 bp = call->request; in afs_fs_remove_file()
690 *bp++ = htonl(dvp->fid.vid); in afs_fs_remove_file()
691 *bp++ = htonl(dvp->fid.vnode); in afs_fs_remove_file()
692 *bp++ = htonl(dvp->fid.unique); in afs_fs_remove_file()
694 memcpy(bp, name->name, namesz); in afs_fs_remove_file()
701 call->fid = dvp->fid; in afs_fs_remove_file()
702 trace_afs_make_fs_call1(call, &dvp->fid, name); in afs_fs_remove_file()
718 const struct qstr *name = &op->dentry->d_name; in afs_fs_remove_dir()
719 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_remove_dir()
726 namesz = name->len; in afs_fs_remove_dir()
727 padsz = (4 - (namesz & 3)) & 3; in afs_fs_remove_dir()
730 call = afs_alloc_flat_call(op->net, &afs_RXFSRemoveDir, in afs_fs_remove_dir()
736 bp = call->request; in afs_fs_remove_dir()
738 *bp++ = htonl(dvp->fid.vid); in afs_fs_remove_dir()
739 *bp++ = htonl(dvp->fid.vnode); in afs_fs_remove_dir()
740 *bp++ = htonl(dvp->fid.unique); in afs_fs_remove_dir()
742 memcpy(bp, name->name, namesz); in afs_fs_remove_dir()
749 call->fid = dvp->fid; in afs_fs_remove_dir()
750 trace_afs_make_fs_call1(call, &dvp->fid, name); in afs_fs_remove_dir()
759 struct afs_operation *op = call->op; in afs_deliver_fs_link()
760 struct afs_vnode_param *dvp = &op->file[0]; in afs_deliver_fs_link()
761 struct afs_vnode_param *vp = &op->file[1]; in afs_deliver_fs_link() local
765 _enter("{%u}", call->unmarshall); in afs_deliver_fs_link()
772 bp = call->buffer; in afs_deliver_fs_link()
773 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_link()
774 xdr_decode_AFSFetchStatus(&bp, call, &dvp->scb); in afs_deliver_fs_link()
775 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_link()
796 const struct qstr *name = &op->dentry->d_name; in afs_fs_link()
797 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_link()
798 struct afs_vnode_param *vp = &op->file[1]; in afs_fs_link() local
805 namesz = name->len; in afs_fs_link()
806 padsz = (4 - (namesz & 3)) & 3; in afs_fs_link()
809 call = afs_alloc_flat_call(op->net, &afs_RXFSLink, reqsz, (21 + 21 + 6) * 4); in afs_fs_link()
814 bp = call->request; in afs_fs_link()
816 *bp++ = htonl(dvp->fid.vid); in afs_fs_link()
817 *bp++ = htonl(dvp->fid.vnode); in afs_fs_link()
818 *bp++ = htonl(dvp->fid.unique); in afs_fs_link()
820 memcpy(bp, name->name, namesz); in afs_fs_link()
826 *bp++ = htonl(vp->fid.vid); in afs_fs_link()
827 *bp++ = htonl(vp->fid.vnode); in afs_fs_link()
828 *bp++ = htonl(vp->fid.unique); in afs_fs_link()
830 call->fid = vp->fid; in afs_fs_link()
831 trace_afs_make_fs_call1(call, &vp->fid, name); in afs_fs_link()
840 struct afs_operation *op = call->op; in afs_deliver_fs_symlink()
841 struct afs_vnode_param *dvp = &op->file[0]; in afs_deliver_fs_symlink()
842 struct afs_vnode_param *vp = &op->file[1]; in afs_deliver_fs_symlink() local
846 _enter("{%u}", call->unmarshall); in afs_deliver_fs_symlink()
853 bp = call->buffer; in afs_deliver_fs_symlink()
854 xdr_decode_AFSFid(&bp, &vp->fid); in afs_deliver_fs_symlink()
855 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_symlink()
856 xdr_decode_AFSFetchStatus(&bp, call, &dvp->scb); in afs_deliver_fs_symlink()
857 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_symlink()
878 const struct qstr *name = &op->dentry->d_name; in afs_fs_symlink()
879 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_symlink()
886 namesz = name->len; in afs_fs_symlink()
887 padsz = (4 - (namesz & 3)) & 3; in afs_fs_symlink()
889 c_namesz = strlen(op->create.symlink); in afs_fs_symlink()
890 c_padsz = (4 - (c_namesz & 3)) & 3; in afs_fs_symlink()
894 call = afs_alloc_flat_call(op->net, &afs_RXFSSymlink, reqsz, in afs_fs_symlink()
900 bp = call->request; in afs_fs_symlink()
902 *bp++ = htonl(dvp->fid.vid); in afs_fs_symlink()
903 *bp++ = htonl(dvp->fid.vnode); in afs_fs_symlink()
904 *bp++ = htonl(dvp->fid.unique); in afs_fs_symlink()
906 memcpy(bp, name->name, namesz); in afs_fs_symlink()
913 memcpy(bp, op->create.symlink, c_namesz); in afs_fs_symlink()
920 *bp++ = htonl(op->mtime.tv_sec); /* mtime */ in afs_fs_symlink()
926 call->fid = dvp->fid; in afs_fs_symlink()
927 trace_afs_make_fs_call1(call, &dvp->fid, name); in afs_fs_symlink()
936 struct afs_operation *op = call->op; in afs_deliver_fs_rename()
937 struct afs_vnode_param *orig_dvp = &op->file[0]; in afs_deliver_fs_rename()
938 struct afs_vnode_param *new_dvp = &op->file[1]; in afs_deliver_fs_rename()
946 bp = call->buffer; in afs_deliver_fs_rename()
950 xdr_decode_AFSFetchStatus(&bp, call, &orig_dvp->scb); in afs_deliver_fs_rename()
951 xdr_decode_AFSFetchStatus(&bp, call, &new_dvp->scb); in afs_deliver_fs_rename()
952 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_rename()
973 struct afs_vnode_param *orig_dvp = &op->file[0]; in afs_fs_rename()
974 struct afs_vnode_param *new_dvp = &op->file[1]; in afs_fs_rename()
975 const struct qstr *orig_name = &op->dentry->d_name; in afs_fs_rename()
976 const struct qstr *new_name = &op->dentry_2->d_name; in afs_fs_rename()
983 o_namesz = orig_name->len; in afs_fs_rename()
984 o_padsz = (4 - (o_namesz & 3)) & 3; in afs_fs_rename()
986 n_namesz = new_name->len; in afs_fs_rename()
987 n_padsz = (4 - (n_namesz & 3)) & 3; in afs_fs_rename()
994 call = afs_alloc_flat_call(op->net, &afs_RXFSRename, reqsz, (21 + 21 + 6) * 4); in afs_fs_rename()
999 bp = call->request; in afs_fs_rename()
1001 *bp++ = htonl(orig_dvp->fid.vid); in afs_fs_rename()
1002 *bp++ = htonl(orig_dvp->fid.vnode); in afs_fs_rename()
1003 *bp++ = htonl(orig_dvp->fid.unique); in afs_fs_rename()
1005 memcpy(bp, orig_name->name, o_namesz); in afs_fs_rename()
1012 *bp++ = htonl(new_dvp->fid.vid); in afs_fs_rename()
1013 *bp++ = htonl(new_dvp->fid.vnode); in afs_fs_rename()
1014 *bp++ = htonl(new_dvp->fid.unique); in afs_fs_rename()
1016 memcpy(bp, new_name->name, n_namesz); in afs_fs_rename()
1023 call->fid = orig_dvp->fid; in afs_fs_rename()
1024 trace_afs_make_fs_call2(call, &orig_dvp->fid, orig_name, new_name); in afs_fs_rename()
1033 struct afs_operation *op = call->op; in afs_deliver_fs_store_data()
1034 struct afs_vnode_param *vp = &op->file[0]; in afs_deliver_fs_store_data() local
1045 bp = call->buffer; in afs_deliver_fs_store_data()
1046 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_store_data()
1047 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_store_data()
1075 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_store_data64() local
1080 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_store_data64()
1082 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData64, in afs_fs_store_data64()
1088 call->write_iter = op->store.write_iter; in afs_fs_store_data64()
1091 bp = call->request; in afs_fs_store_data64()
1093 *bp++ = htonl(vp->fid.vid); in afs_fs_store_data64()
1094 *bp++ = htonl(vp->fid.vnode); in afs_fs_store_data64()
1095 *bp++ = htonl(vp->fid.unique); in afs_fs_store_data64()
1098 *bp++ = htonl(op->mtime.tv_sec); /* mtime */ in afs_fs_store_data64()
1104 *bp++ = htonl(upper_32_bits(op->store.pos)); in afs_fs_store_data64()
1105 *bp++ = htonl(lower_32_bits(op->store.pos)); in afs_fs_store_data64()
1106 *bp++ = htonl(upper_32_bits(op->store.size)); in afs_fs_store_data64()
1107 *bp++ = htonl(lower_32_bits(op->store.size)); in afs_fs_store_data64()
1108 *bp++ = htonl(upper_32_bits(op->store.i_size)); in afs_fs_store_data64()
1109 *bp++ = htonl(lower_32_bits(op->store.i_size)); in afs_fs_store_data64()
1111 call->fid = vp->fid; in afs_fs_store_data64()
1112 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_store_data64()
1121 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_store_data() local
1126 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_store_data()
1129 (unsigned long long)op->store.size, in afs_fs_store_data()
1130 (unsigned long long)op->store.pos, in afs_fs_store_data()
1131 (unsigned long long)op->store.i_size); in afs_fs_store_data()
1133 if (test_bit(AFS_SERVER_FL_HAS_FS64, &op->server->flags)) in afs_fs_store_data()
1136 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData, in afs_fs_store_data()
1142 call->write_iter = op->store.write_iter; in afs_fs_store_data()
1145 bp = call->request; in afs_fs_store_data()
1147 *bp++ = htonl(vp->fid.vid); in afs_fs_store_data()
1148 *bp++ = htonl(vp->fid.vnode); in afs_fs_store_data()
1149 *bp++ = htonl(vp->fid.unique); in afs_fs_store_data()
1152 *bp++ = htonl(op->mtime.tv_sec); /* mtime */ in afs_fs_store_data()
1158 *bp++ = htonl(lower_32_bits(op->store.pos)); in afs_fs_store_data()
1159 *bp++ = htonl(lower_32_bits(op->store.size)); in afs_fs_store_data()
1160 *bp++ = htonl(lower_32_bits(op->store.i_size)); in afs_fs_store_data()
1162 call->fid = vp->fid; in afs_fs_store_data()
1163 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_store_data()
1197 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_setattr_size64() local
1199 struct iattr *attr = op->setattr.attr; in afs_fs_setattr_size64()
1203 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_setattr_size64()
1205 ASSERT(attr->ia_valid & ATTR_SIZE); in afs_fs_setattr_size64()
1207 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData64_as_Status, in afs_fs_setattr_size64()
1214 bp = call->request; in afs_fs_setattr_size64()
1216 *bp++ = htonl(vp->fid.vid); in afs_fs_setattr_size64()
1217 *bp++ = htonl(vp->fid.vnode); in afs_fs_setattr_size64()
1218 *bp++ = htonl(vp->fid.unique); in afs_fs_setattr_size64()
1222 *bp++ = htonl(upper_32_bits(attr->ia_size)); /* position of start of write */ in afs_fs_setattr_size64()
1223 *bp++ = htonl(lower_32_bits(attr->ia_size)); in afs_fs_setattr_size64()
1226 *bp++ = htonl(upper_32_bits(attr->ia_size)); /* new file length */ in afs_fs_setattr_size64()
1227 *bp++ = htonl(lower_32_bits(attr->ia_size)); in afs_fs_setattr_size64()
1229 call->fid = vp->fid; in afs_fs_setattr_size64()
1230 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_setattr_size64()
1240 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_setattr_size() local
1242 struct iattr *attr = op->setattr.attr; in afs_fs_setattr_size()
1246 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_setattr_size()
1248 ASSERT(attr->ia_valid & ATTR_SIZE); in afs_fs_setattr_size()
1249 if (test_bit(AFS_SERVER_FL_HAS_FS64, &op->server->flags)) in afs_fs_setattr_size()
1252 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData_as_Status, in afs_fs_setattr_size()
1259 bp = call->request; in afs_fs_setattr_size()
1261 *bp++ = htonl(vp->fid.vid); in afs_fs_setattr_size()
1262 *bp++ = htonl(vp->fid.vnode); in afs_fs_setattr_size()
1263 *bp++ = htonl(vp->fid.unique); in afs_fs_setattr_size()
1267 *bp++ = htonl(attr->ia_size); /* position of start of write */ in afs_fs_setattr_size()
1269 *bp++ = htonl(attr->ia_size); /* new file length */ in afs_fs_setattr_size()
1271 call->fid = vp->fid; in afs_fs_setattr_size()
1272 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_setattr_size()
1282 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_setattr() local
1284 struct iattr *attr = op->setattr.attr; in afs_fs_setattr()
1287 if (attr->ia_valid & ATTR_SIZE) in afs_fs_setattr()
1291 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_setattr()
1293 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreStatus, in afs_fs_setattr()
1300 bp = call->request; in afs_fs_setattr()
1302 *bp++ = htonl(vp->fid.vid); in afs_fs_setattr()
1303 *bp++ = htonl(vp->fid.vnode); in afs_fs_setattr()
1304 *bp++ = htonl(vp->fid.unique); in afs_fs_setattr()
1306 xdr_encode_AFS_StoreStatus(&bp, op->setattr.attr); in afs_fs_setattr()
1308 call->fid = vp->fid; in afs_fs_setattr()
1309 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_setattr()
1318 struct afs_operation *op = call->op; in afs_deliver_fs_get_volume_status()
1320 char *p; in afs_deliver_fs_get_volume_status() local
1324 _enter("{%u}", call->unmarshall); in afs_deliver_fs_get_volume_status()
1326 switch (call->unmarshall) { in afs_deliver_fs_get_volume_status()
1328 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1339 bp = call->buffer; in afs_deliver_fs_get_volume_status()
1340 xdr_decode_AFSFetchVolumeStatus(&bp, &op->volstatus.vs); in afs_deliver_fs_get_volume_status()
1341 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1351 call->count = ntohl(call->tmp); in afs_deliver_fs_get_volume_status()
1352 _debug("volname length: %u", call->count); in afs_deliver_fs_get_volume_status()
1353 if (call->count >= AFSNAMEMAX) in afs_deliver_fs_get_volume_status()
1355 size = (call->count + 3) & ~3; /* It's padded */ in afs_deliver_fs_get_volume_status()
1357 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1367 p = call->buffer; in afs_deliver_fs_get_volume_status()
1368 p[call->count] = 0; in afs_deliver_fs_get_volume_status()
1369 _debug("volname '%s'", p); in afs_deliver_fs_get_volume_status()
1371 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1380 call->count = ntohl(call->tmp); in afs_deliver_fs_get_volume_status()
1381 _debug("offline msg length: %u", call->count); in afs_deliver_fs_get_volume_status()
1382 if (call->count >= AFSNAMEMAX) in afs_deliver_fs_get_volume_status()
1384 size = (call->count + 3) & ~3; /* It's padded */ in afs_deliver_fs_get_volume_status()
1386 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1396 p = call->buffer; in afs_deliver_fs_get_volume_status()
1397 p[call->count] = 0; in afs_deliver_fs_get_volume_status()
1398 _debug("offline '%s'", p); in afs_deliver_fs_get_volume_status()
1401 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1410 call->count = ntohl(call->tmp); in afs_deliver_fs_get_volume_status()
1411 _debug("motd length: %u", call->count); in afs_deliver_fs_get_volume_status()
1412 if (call->count >= AFSNAMEMAX) in afs_deliver_fs_get_volume_status()
1414 size = (call->count + 3) & ~3; /* It's padded */ in afs_deliver_fs_get_volume_status()
1416 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1426 p = call->buffer; in afs_deliver_fs_get_volume_status()
1427 p[call->count] = 0; in afs_deliver_fs_get_volume_status()
1428 _debug("motd '%s'", p); in afs_deliver_fs_get_volume_status()
1430 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1456 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_get_volume_status() local
1462 call = afs_alloc_flat_call(op->net, &afs_RXFSGetVolumeStatus, 2 * 4, in afs_fs_get_volume_status()
1468 bp = call->request; in afs_fs_get_volume_status()
1470 bp[1] = htonl(vp->fid.vid); in afs_fs_get_volume_status()
1472 call->fid = vp->fid; in afs_fs_get_volume_status()
1473 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_get_volume_status()
1482 struct afs_operation *op = call->op; in afs_deliver_fs_xxxx_lock()
1486 _enter("{%u}", call->unmarshall); in afs_deliver_fs_xxxx_lock()
1493 bp = call->buffer; in afs_deliver_fs_xxxx_lock()
1494 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_xxxx_lock()
1537 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_set_lock() local
1543 call = afs_alloc_flat_call(op->net, &afs_RXFSSetLock, 5 * 4, 6 * 4); in afs_fs_set_lock()
1548 bp = call->request; in afs_fs_set_lock()
1550 *bp++ = htonl(vp->fid.vid); in afs_fs_set_lock()
1551 *bp++ = htonl(vp->fid.vnode); in afs_fs_set_lock()
1552 *bp++ = htonl(vp->fid.unique); in afs_fs_set_lock()
1553 *bp++ = htonl(op->lock.type); in afs_fs_set_lock()
1555 call->fid = vp->fid; in afs_fs_set_lock()
1556 trace_afs_make_fs_calli(call, &vp->fid, op->lock.type); in afs_fs_set_lock()
1565 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_extend_lock() local
1571 call = afs_alloc_flat_call(op->net, &afs_RXFSExtendLock, 4 * 4, 6 * 4); in afs_fs_extend_lock()
1576 bp = call->request; in afs_fs_extend_lock()
1578 *bp++ = htonl(vp->fid.vid); in afs_fs_extend_lock()
1579 *bp++ = htonl(vp->fid.vnode); in afs_fs_extend_lock()
1580 *bp++ = htonl(vp->fid.unique); in afs_fs_extend_lock()
1582 call->fid = vp->fid; in afs_fs_extend_lock()
1583 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_extend_lock()
1592 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_release_lock() local
1598 call = afs_alloc_flat_call(op->net, &afs_RXFSReleaseLock, 4 * 4, 6 * 4); in afs_fs_release_lock()
1603 bp = call->request; in afs_fs_release_lock()
1605 *bp++ = htonl(vp->fid.vid); in afs_fs_release_lock()
1606 *bp++ = htonl(vp->fid.vnode); in afs_fs_release_lock()
1607 *bp++ = htonl(vp->fid.unique); in afs_fs_release_lock()
1609 call->fid = vp->fid; in afs_fs_release_lock()
1610 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_release_lock()
1646 return -ENOMEM; in afs_fs_give_up_all_callbacks()
1648 call->key = key; in afs_fs_give_up_all_callbacks()
1649 call->peer = rxrpc_kernel_get_peer(addr->peer); in afs_fs_give_up_all_callbacks()
1650 call->service_id = server->service_id; in afs_fs_give_up_all_callbacks()
1653 bp = call->request; in afs_fs_give_up_all_callbacks()
1656 call->server = afs_use_server(server, afs_server_trace_give_up_cb); in afs_fs_give_up_all_callbacks()
1659 ret = call->error; in afs_fs_give_up_all_callbacks()
1660 if (call->responded) in afs_fs_give_up_all_callbacks()
1661 set_bit(AFS_SERVER_FL_RESPONDING, &server->flags); in afs_fs_give_up_all_callbacks()
1674 _enter("{%u,%zu}", call->unmarshall, iov_iter_count(call->iter)); in afs_deliver_fs_get_capabilities()
1676 switch (call->unmarshall) { in afs_deliver_fs_get_capabilities()
1679 call->unmarshall++; in afs_deliver_fs_get_capabilities()
1688 count = ntohl(call->tmp); in afs_deliver_fs_get_capabilities()
1689 call->count = count; in afs_deliver_fs_get_capabilities()
1690 call->count2 = count; in afs_deliver_fs_get_capabilities()
1692 call->unmarshall = 4; in afs_deliver_fs_get_capabilities()
1693 call->tmp = 0; in afs_deliver_fs_get_capabilities()
1697 /* Extract the first word of the capabilities to call->tmp */ in afs_deliver_fs_get_capabilities()
1699 call->unmarshall++; in afs_deliver_fs_get_capabilities()
1707 afs_extract_discard(call, (count - 1) * sizeof(__be32)); in afs_deliver_fs_get_capabilities()
1708 call->unmarshall++; in afs_deliver_fs_get_capabilities()
1717 call->unmarshall++; in afs_deliver_fs_get_capabilities()
1727 afs_put_endpoint_state(call->probe, afs_estate_trace_put_getcaps); in afs_fs_get_capabilities_destructor()
1747 * ->done() - otherwise we return false to indicate we didn't even try.
1762 call->key = key; in afs_fs_get_capabilities()
1763 call->server = afs_use_server(server, afs_server_trace_get_caps); in afs_fs_get_capabilities()
1764 call->peer = rxrpc_kernel_get_peer(estate->addresses->addrs[addr_index].peer); in afs_fs_get_capabilities()
1765 call->probe = afs_get_endpoint_state(estate, afs_estate_trace_get_getcaps); in afs_fs_get_capabilities()
1766 call->probe_index = addr_index; in afs_fs_get_capabilities()
1767 call->service_id = server->service_id; in afs_fs_get_capabilities()
1768 call->upgrade = true; in afs_fs_get_capabilities()
1769 call->async = true; in afs_fs_get_capabilities()
1770 call->max_lifespan = AFS_PROBE_MAX_LIFESPAN; in afs_fs_get_capabilities()
1773 bp = call->request; in afs_fs_get_capabilities()
1787 struct afs_operation *op = call->op; in afs_deliver_fs_inline_bulk_status()
1793 _enter("{%u}", call->unmarshall); in afs_deliver_fs_inline_bulk_status()
1795 switch (call->unmarshall) { in afs_deliver_fs_inline_bulk_status()
1798 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1808 tmp = ntohl(call->tmp); in afs_deliver_fs_inline_bulk_status()
1809 _debug("status count: %u/%u", tmp, op->nr_files); in afs_deliver_fs_inline_bulk_status()
1810 if (tmp != op->nr_files) in afs_deliver_fs_inline_bulk_status()
1813 call->count = 0; in afs_deliver_fs_inline_bulk_status()
1814 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1820 _debug("extract status array %u", call->count); in afs_deliver_fs_inline_bulk_status()
1825 switch (call->count) { in afs_deliver_fs_inline_bulk_status()
1827 scb = &op->file[0].scb; in afs_deliver_fs_inline_bulk_status()
1830 scb = &op->file[1].scb; in afs_deliver_fs_inline_bulk_status()
1833 scb = &op->more_files[call->count - 2].scb; in afs_deliver_fs_inline_bulk_status()
1837 bp = call->buffer; in afs_deliver_fs_inline_bulk_status()
1840 call->count++; in afs_deliver_fs_inline_bulk_status()
1841 if (call->count < op->nr_files) in afs_deliver_fs_inline_bulk_status()
1844 call->count = 0; in afs_deliver_fs_inline_bulk_status()
1845 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1856 tmp = ntohl(call->tmp); in afs_deliver_fs_inline_bulk_status()
1858 if (tmp != op->nr_files) in afs_deliver_fs_inline_bulk_status()
1860 call->count = 0; in afs_deliver_fs_inline_bulk_status()
1861 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1873 switch (call->count) { in afs_deliver_fs_inline_bulk_status()
1875 scb = &op->file[0].scb; in afs_deliver_fs_inline_bulk_status()
1878 scb = &op->file[1].scb; in afs_deliver_fs_inline_bulk_status()
1881 scb = &op->more_files[call->count - 2].scb; in afs_deliver_fs_inline_bulk_status()
1885 bp = call->buffer; in afs_deliver_fs_inline_bulk_status()
1887 call->count++; in afs_deliver_fs_inline_bulk_status()
1888 if (call->count < op->nr_files) in afs_deliver_fs_inline_bulk_status()
1892 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1900 bp = call->buffer; in afs_deliver_fs_inline_bulk_status()
1901 /* Unfortunately, prior to OpenAFS-1.6, volsync here is filled in afs_deliver_fs_inline_bulk_status()
1906 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1919 if (call->error == -ECONNABORTED && in afs_done_fs_inline_bulk_status()
1920 call->abort_code == RX_INVALID_OPERATION) { in afs_done_fs_inline_bulk_status()
1921 set_bit(AFS_SERVER_FL_NO_IBULK, &call->server->flags); in afs_done_fs_inline_bulk_status()
1922 if (call->op) in afs_done_fs_inline_bulk_status()
1923 set_bit(AFS_VOLUME_MAYBE_NO_IBULK, &call->op->volume->flags); in afs_done_fs_inline_bulk_status()
1943 struct afs_vnode_param *dvp = &op->file[0]; in afs_fs_inline_bulk_status()
1944 struct afs_vnode_param *vp = &op->file[1]; in afs_fs_inline_bulk_status() local
1949 if (test_bit(AFS_SERVER_FL_NO_IBULK, &op->server->flags)) { in afs_fs_inline_bulk_status()
1950 afs_op_set_error(op, -ENOTSUPP); in afs_fs_inline_bulk_status()
1955 key_serial(op->key), vp->fid.vid, vp->fid.vnode, op->nr_files); in afs_fs_inline_bulk_status()
1957 call = afs_alloc_flat_call(op->net, &afs_RXFSInlineBulkStatus, in afs_fs_inline_bulk_status()
1958 (2 + op->nr_files * 3) * 4, in afs_fs_inline_bulk_status()
1964 bp = call->request; in afs_fs_inline_bulk_status()
1966 *bp++ = htonl(op->nr_files); in afs_fs_inline_bulk_status()
1967 *bp++ = htonl(dvp->fid.vid); in afs_fs_inline_bulk_status()
1968 *bp++ = htonl(dvp->fid.vnode); in afs_fs_inline_bulk_status()
1969 *bp++ = htonl(dvp->fid.unique); in afs_fs_inline_bulk_status()
1970 *bp++ = htonl(vp->fid.vid); in afs_fs_inline_bulk_status()
1971 *bp++ = htonl(vp->fid.vnode); in afs_fs_inline_bulk_status()
1972 *bp++ = htonl(vp->fid.unique); in afs_fs_inline_bulk_status()
1973 for (i = 0; i < op->nr_files - 2; i++) { in afs_fs_inline_bulk_status()
1974 *bp++ = htonl(op->more_files[i].fid.vid); in afs_fs_inline_bulk_status()
1975 *bp++ = htonl(op->more_files[i].fid.vnode); in afs_fs_inline_bulk_status()
1976 *bp++ = htonl(op->more_files[i].fid.unique); in afs_fs_inline_bulk_status()
1979 call->fid = vp->fid; in afs_fs_inline_bulk_status()
1980 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_inline_bulk_status()
1989 struct afs_operation *op = call->op; in afs_deliver_fs_fetch_acl()
1990 struct afs_vnode_param *vp = &op->file[0]; in afs_deliver_fs_fetch_acl() local
1996 _enter("{%u}", call->unmarshall); in afs_deliver_fs_fetch_acl()
1998 switch (call->unmarshall) { in afs_deliver_fs_fetch_acl()
2001 call->unmarshall++; in afs_deliver_fs_fetch_acl()
2010 size = call->count2 = ntohl(call->tmp); in afs_deliver_fs_fetch_acl()
2015 return -ENOMEM; in afs_deliver_fs_fetch_acl()
2016 op->acl = acl; in afs_deliver_fs_fetch_acl()
2017 acl->size = call->count2; in afs_deliver_fs_fetch_acl()
2018 afs_extract_begin(call, acl->data, size); in afs_deliver_fs_fetch_acl()
2019 call->unmarshall++; in afs_deliver_fs_fetch_acl()
2029 call->unmarshall++; in afs_deliver_fs_fetch_acl()
2038 bp = call->buffer; in afs_deliver_fs_fetch_acl()
2039 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_fetch_acl()
2040 xdr_decode_AFSVolSync(&bp, &op->volsync); in afs_deliver_fs_fetch_acl()
2042 call->unmarshall++; in afs_deliver_fs_fetch_acl()
2067 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_fetch_acl() local
2072 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_fetch_acl()
2074 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchACL, 16, (21 + 6) * 4); in afs_fs_fetch_acl()
2079 bp = call->request; in afs_fs_fetch_acl()
2081 bp[1] = htonl(vp->fid.vid); in afs_fs_fetch_acl()
2082 bp[2] = htonl(vp->fid.vnode); in afs_fs_fetch_acl()
2083 bp[3] = htonl(vp->fid.unique); in afs_fs_fetch_acl()
2085 call->fid = vp->fid; in afs_fs_fetch_acl()
2086 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_fetch_acl()
2105 struct afs_vnode_param *vp = &op->file[0]; in afs_fs_store_acl() local
2107 const struct afs_acl *acl = op->acl; in afs_fs_store_acl()
2112 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in afs_fs_store_acl()
2114 size = round_up(acl->size, 4); in afs_fs_store_acl()
2115 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreACL, in afs_fs_store_acl()
2121 bp = call->request; in afs_fs_store_acl()
2123 bp[1] = htonl(vp->fid.vid); in afs_fs_store_acl()
2124 bp[2] = htonl(vp->fid.vnode); in afs_fs_store_acl()
2125 bp[3] = htonl(vp->fid.unique); in afs_fs_store_acl()
2126 bp[4] = htonl(acl->size); in afs_fs_store_acl()
2127 memcpy(&bp[5], acl->data, acl->size); in afs_fs_store_acl()
2128 if (acl->size != size) in afs_fs_store_acl()
2129 memset((void *)&bp[5] + acl->size, 0, size - acl->size); in afs_fs_store_acl()
2131 call->fid = vp->fid; in afs_fs_store_acl()
2132 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_store_acl()