Lines Matching +full:op +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0-or-later
24 fid->vid = xdr_to_u64(x->volume); in xdr_decode_YFSFid()
25 fid->vnode = xdr_to_u64(x->vnode.lo); in xdr_decode_YFSFid()
26 fid->vnode_hi = ntohl(x->vnode.hi); in xdr_decode_YFSFid()
27 fid->unique = ntohl(x->vnode.unique); in xdr_decode_YFSFid()
49 x->volume = u64_to_xdr(fid->vid); in xdr_encode_YFSFid()
50 x->vnode.lo = u64_to_xdr(fid->vnode); in xdr_encode_YFSFid()
51 x->vnode.hi = htonl(fid->vnode_hi); in xdr_encode_YFSFid()
52 x->vnode.unique = htonl(fid->unique); in xdr_encode_YFSFid()
66 unsigned int pad = 4 - (len & 3); in xdr_encode_string()
77 return xdr_encode_string(bp, p->name, p->len); in xdr_encode_name()
83 return (u64)t->tv_sec * 10000000 + t->tv_nsec/100; in linux_to_yfs_time()
86 static __be32 *xdr_encode_YFSStoreStatus(__be32 *bp, mode_t *mode, in xdr_encode_YFSStoreStatus() argument
90 mode_t masked_mode = mode ? *mode & S_IALLUGO : 0; in xdr_encode_YFSStoreStatus()
94 mask |= mode ? AFS_SET_MODE : 0; in xdr_encode_YFSStoreStatus()
96 x->mask = htonl(mask); in xdr_encode_YFSStoreStatus()
97 x->mode = htonl(masked_mode); in xdr_encode_YFSStoreStatus()
98 x->mtime_client = u64_to_xdr(mtime); in xdr_encode_YFSStoreStatus()
99 x->owner = u64_to_xdr(0); in xdr_encode_YFSStoreStatus()
100 x->group = u64_to_xdr(0); in xdr_encode_YFSStoreStatus()
105 * Convert a signed 100ns-resolution 64-bit time into a timespec.
118 abs_t = -t; in yfs_time_to_linux()
120 ts.tv_nsec = -ts.tv_nsec; in yfs_time_to_linux()
121 ts.tv_sec = -abs_t; in yfs_time_to_linux()
140 size_t len = (void *)bp - call->request; in yfs_check_req()
142 if (len > call->request_size) in yfs_check_req()
144 call->type->name, len, call->request_size); in yfs_check_req()
145 else if (len < call->request_size) in yfs_check_req()
147 call->type->name, len, call->request_size); in yfs_check_req()
178 struct afs_file_status *status = &scb->status; in xdr_decode_YFSFetchStatus()
181 status->abort_code = ntohl(xdr->abort_code); in xdr_decode_YFSFetchStatus()
182 if (status->abort_code != 0) { in xdr_decode_YFSFetchStatus()
183 if (status->abort_code == VNOVNODE) in xdr_decode_YFSFetchStatus()
184 status->nlink = 0; in xdr_decode_YFSFetchStatus()
185 scb->have_error = true; in xdr_decode_YFSFetchStatus()
189 type = ntohl(xdr->type); in xdr_decode_YFSFetchStatus()
194 status->type = type; in xdr_decode_YFSFetchStatus()
200 status->nlink = ntohl(xdr->nlink); in xdr_decode_YFSFetchStatus()
201 status->author = xdr_to_u64(xdr->author); in xdr_decode_YFSFetchStatus()
202 status->owner = xdr_to_u64(xdr->owner); in xdr_decode_YFSFetchStatus()
203 status->caller_access = ntohl(xdr->caller_access); /* Ticket dependent */ in xdr_decode_YFSFetchStatus()
204 status->anon_access = ntohl(xdr->anon_access); in xdr_decode_YFSFetchStatus()
205 status->mode = ntohl(xdr->mode) & S_IALLUGO; in xdr_decode_YFSFetchStatus()
206 status->group = xdr_to_u64(xdr->group); in xdr_decode_YFSFetchStatus()
207 status->lock_count = ntohl(xdr->lock_count); in xdr_decode_YFSFetchStatus()
209 status->mtime_client = xdr_to_time(xdr->mtime_client); in xdr_decode_YFSFetchStatus()
210 status->mtime_server = xdr_to_time(xdr->mtime_server); in xdr_decode_YFSFetchStatus()
211 status->size = xdr_to_u64(xdr->size); in xdr_decode_YFSFetchStatus()
212 status->data_version = xdr_to_u64(xdr->data_version); in xdr_decode_YFSFetchStatus()
213 scb->have_status = true; in xdr_decode_YFSFetchStatus()
232 struct afs_callback *cb = &scb->callback; in xdr_decode_YFSCallBack()
235 cb_expiry = ktime_add(call->issue_time, xdr_to_u64(x->expiration_time) * 100); in xdr_decode_YFSCallBack()
236 cb->expires_at = ktime_divns(cb_expiry, NSEC_PER_SEC); in xdr_decode_YFSCallBack()
237 scb->have_cb = true; in xdr_decode_YFSCallBack()
251 creation = xdr_to_u64(x->vol_creation_date); in xdr_decode_YFSVolSync()
253 volsync->creation = creation; in xdr_decode_YFSVolSync()
254 update = xdr_to_u64(x->vol_update_date); in xdr_decode_YFSVolSync()
256 volsync->update = update; in xdr_decode_YFSVolSync()
269 u32 mask = 0, mode = 0; in xdr_encode_YFS_StoreStatus() local
272 if (attr->ia_valid & ATTR_MTIME) { in xdr_encode_YFS_StoreStatus()
274 mtime = linux_to_yfs_time(&attr->ia_mtime); in xdr_encode_YFS_StoreStatus()
277 if (attr->ia_valid & ATTR_UID) { in xdr_encode_YFS_StoreStatus()
279 owner = from_kuid(&init_user_ns, attr->ia_uid); in xdr_encode_YFS_StoreStatus()
282 if (attr->ia_valid & ATTR_GID) { in xdr_encode_YFS_StoreStatus()
284 group = from_kgid(&init_user_ns, attr->ia_gid); in xdr_encode_YFS_StoreStatus()
287 if (attr->ia_valid & ATTR_MODE) { in xdr_encode_YFS_StoreStatus()
289 mode = attr->ia_mode & S_IALLUGO; in xdr_encode_YFS_StoreStatus()
292 x->mask = htonl(mask); in xdr_encode_YFS_StoreStatus()
293 x->mode = htonl(mode); in xdr_encode_YFS_StoreStatus()
294 x->mtime_client = u64_to_xdr(mtime); in xdr_encode_YFS_StoreStatus()
295 x->owner = u64_to_xdr(owner); in xdr_encode_YFS_StoreStatus()
296 x->group = u64_to_xdr(group); in xdr_encode_YFS_StoreStatus()
309 vs->vid = xdr_to_u64(x->vid); in xdr_decode_YFSFetchVolumeStatus()
310 vs->parent_id = xdr_to_u64(x->parent_id); in xdr_decode_YFSFetchVolumeStatus()
311 flags = ntohl(x->flags); in xdr_decode_YFSFetchVolumeStatus()
312 vs->online = flags & yfs_FVSOnline; in xdr_decode_YFSFetchVolumeStatus()
313 vs->in_service = flags & yfs_FVSInservice; in xdr_decode_YFSFetchVolumeStatus()
314 vs->blessed = flags & yfs_FVSBlessed; in xdr_decode_YFSFetchVolumeStatus()
315 vs->needs_salvage = flags & yfs_FVSNeedsSalvage; in xdr_decode_YFSFetchVolumeStatus()
316 vs->type = ntohl(x->type); in xdr_decode_YFSFetchVolumeStatus()
317 vs->min_quota = 0; in xdr_decode_YFSFetchVolumeStatus()
318 vs->max_quota = xdr_to_u64(x->max_quota); in xdr_decode_YFSFetchVolumeStatus()
319 vs->blocks_in_use = xdr_to_u64(x->blocks_in_use); in xdr_decode_YFSFetchVolumeStatus()
320 vs->part_blocks_avail = xdr_to_u64(x->part_blocks_avail); in xdr_decode_YFSFetchVolumeStatus()
321 vs->part_max_blocks = xdr_to_u64(x->part_max_blocks); in xdr_decode_YFSFetchVolumeStatus()
322 vs->vol_copy_date = xdr_to_u64(x->vol_copy_date); in xdr_decode_YFSFetchVolumeStatus()
323 vs->vol_backup_date = xdr_to_u64(x->vol_backup_date); in xdr_decode_YFSFetchVolumeStatus()
333 struct afs_operation *op = call->op; in yfs_deliver_status_and_volsync() local
341 bp = call->buffer; in yfs_deliver_status_and_volsync()
342 xdr_decode_YFSFetchStatus(&bp, call, &op->file[0].scb); in yfs_deliver_status_and_volsync()
343 xdr_decode_YFSVolSync(&bp, &op->volsync); in yfs_deliver_status_and_volsync()
354 struct afs_operation *op = call->op; in yfs_deliver_fs_fetch_data64() local
355 struct netfs_io_subrequest *subreq = op->fetch.subreq; in yfs_deliver_fs_fetch_data64()
356 struct afs_vnode_param *vp = &op->file[0]; in yfs_deliver_fs_fetch_data64()
362 call->unmarshall, call->iov_len, iov_iter_count(call->iter), in yfs_deliver_fs_fetch_data64()
363 call->remaining); in yfs_deliver_fs_fetch_data64()
365 switch (call->unmarshall) { in yfs_deliver_fs_fetch_data64()
367 call->remaining = 0; in yfs_deliver_fs_fetch_data64()
369 call->unmarshall++; in yfs_deliver_fs_fetch_data64()
372 /* Extract the returned data length into ->actual_len. This in yfs_deliver_fs_fetch_data64()
382 call->remaining = be64_to_cpu(call->tmp64); in yfs_deliver_fs_fetch_data64()
383 _debug("DATA length: %llu", call->remaining); in yfs_deliver_fs_fetch_data64()
385 if (call->remaining == 0) in yfs_deliver_fs_fetch_data64()
388 call->iter = &subreq->io_iter; in yfs_deliver_fs_fetch_data64()
389 call->iov_len = min(call->remaining, subreq->len - subreq->transferred); in yfs_deliver_fs_fetch_data64()
390 call->unmarshall++; in yfs_deliver_fs_fetch_data64()
395 count_before = call->iov_len; in yfs_deliver_fs_fetch_data64()
396 _debug("extract data %zu/%llu", count_before, call->remaining); in yfs_deliver_fs_fetch_data64()
399 subreq->transferred += count_before - call->iov_len; in yfs_deliver_fs_fetch_data64()
403 call->iter = &call->def_iter; in yfs_deliver_fs_fetch_data64()
404 if (call->remaining) in yfs_deliver_fs_fetch_data64()
408 afs_extract_discard(call, call->remaining); in yfs_deliver_fs_fetch_data64()
409 call->unmarshall = 3; in yfs_deliver_fs_fetch_data64()
414 iov_iter_count(call->iter), call->remaining); in yfs_deliver_fs_fetch_data64()
421 call->unmarshall = 4; in yfs_deliver_fs_fetch_data64()
434 bp = call->buffer; in yfs_deliver_fs_fetch_data64()
435 xdr_decode_YFSFetchStatus(&bp, call, &vp->scb); in yfs_deliver_fs_fetch_data64()
436 xdr_decode_YFSCallBack(&bp, call, &vp->scb); in yfs_deliver_fs_fetch_data64()
437 xdr_decode_YFSVolSync(&bp, &op->volsync); in yfs_deliver_fs_fetch_data64()
439 if (subreq->start + subreq->transferred >= vp->scb.status.size) in yfs_deliver_fs_fetch_data64()
440 __set_bit(NETFS_SREQ_HIT_EOF, &subreq->flags); in yfs_deliver_fs_fetch_data64()
442 call->unmarshall++; in yfs_deliver_fs_fetch_data64()
458 .op = yfs_FS_FetchData64,
468 void yfs_fs_fetch_data(struct afs_operation *op) in yfs_fs_fetch_data() argument
470 struct netfs_io_subrequest *subreq = op->fetch.subreq; in yfs_fs_fetch_data()
471 struct afs_vnode_param *vp = &op->file[0]; in yfs_fs_fetch_data()
476 key_serial(op->key), vp->fid.vid, vp->fid.vnode, in yfs_fs_fetch_data()
477 subreq->start + subreq->transferred, in yfs_fs_fetch_data()
478 subreq->len - subreq->transferred); in yfs_fs_fetch_data()
480 call = afs_alloc_flat_call(op->net, &yfs_RXYFSFetchData64, in yfs_fs_fetch_data()
488 return afs_op_nomem(op); in yfs_fs_fetch_data()
490 if (op->flags & AFS_OPERATION_ASYNC) in yfs_fs_fetch_data()
491 call->async = true; in yfs_fs_fetch_data()
494 bp = call->request; in yfs_fs_fetch_data()
497 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_fetch_data()
498 bp = xdr_encode_u64(bp, subreq->start + subreq->transferred); in yfs_fs_fetch_data()
499 bp = xdr_encode_u64(bp, subreq->len - subreq->transferred); in yfs_fs_fetch_data()
502 call->fid = vp->fid; in yfs_fs_fetch_data()
503 trace_afs_make_fs_call(call, &vp->fid); in yfs_fs_fetch_data()
504 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_fetch_data()
512 struct afs_operation *op = call->op; in yfs_deliver_fs_create_vnode() local
513 struct afs_vnode_param *dvp = &op->file[0]; in yfs_deliver_fs_create_vnode()
514 struct afs_vnode_param *vp = &op->file[1]; in yfs_deliver_fs_create_vnode()
518 _enter("{%u}", call->unmarshall); in yfs_deliver_fs_create_vnode()
525 bp = call->buffer; in yfs_deliver_fs_create_vnode()
526 xdr_decode_YFSFid(&bp, &op->file[1].fid); in yfs_deliver_fs_create_vnode()
527 xdr_decode_YFSFetchStatus(&bp, call, &vp->scb); in yfs_deliver_fs_create_vnode()
528 xdr_decode_YFSFetchStatus(&bp, call, &dvp->scb); in yfs_deliver_fs_create_vnode()
529 xdr_decode_YFSCallBack(&bp, call, &vp->scb); in yfs_deliver_fs_create_vnode()
530 xdr_decode_YFSVolSync(&bp, &op->volsync); in yfs_deliver_fs_create_vnode()
541 .op = yfs_FS_CreateFile,
549 void yfs_fs_create_file(struct afs_operation *op) in yfs_fs_create_file() argument
551 const struct qstr *name = &op->dentry->d_name; in yfs_fs_create_file()
552 struct afs_vnode_param *dvp = &op->file[0]; in yfs_fs_create_file()
562 xdr_strlen(name->len) + in yfs_fs_create_file()
571 call = afs_alloc_flat_call(op->net, &afs_RXFSCreateFile, reqsz, rplsz); in yfs_fs_create_file()
573 return afs_op_nomem(op); in yfs_fs_create_file()
576 bp = call->request; in yfs_fs_create_file()
579 bp = xdr_encode_YFSFid(bp, &dvp->fid); in yfs_fs_create_file()
581 bp = xdr_encode_YFSStoreStatus(bp, &op->create.mode, &op->mtime); in yfs_fs_create_file()
585 call->fid = dvp->fid; in yfs_fs_create_file()
586 trace_afs_make_fs_call1(call, &dvp->fid, name); in yfs_fs_create_file()
587 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_create_file()
592 .op = yfs_FS_MakeDir,
600 void yfs_fs_make_dir(struct afs_operation *op) in yfs_fs_make_dir() argument
602 const struct qstr *name = &op->dentry->d_name; in yfs_fs_make_dir()
603 struct afs_vnode_param *dvp = &op->file[0]; in yfs_fs_make_dir()
613 xdr_strlen(name->len) + in yfs_fs_make_dir()
621 call = afs_alloc_flat_call(op->net, &yfs_RXFSMakeDir, reqsz, rplsz); in yfs_fs_make_dir()
623 return afs_op_nomem(op); in yfs_fs_make_dir()
626 bp = call->request; in yfs_fs_make_dir()
629 bp = xdr_encode_YFSFid(bp, &dvp->fid); in yfs_fs_make_dir()
631 bp = xdr_encode_YFSStoreStatus(bp, &op->create.mode, &op->mtime); in yfs_fs_make_dir()
634 call->fid = dvp->fid; in yfs_fs_make_dir()
635 trace_afs_make_fs_call1(call, &dvp->fid, name); in yfs_fs_make_dir()
636 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_make_dir()
644 struct afs_operation *op = call->op; in yfs_deliver_fs_remove_file2() local
645 struct afs_vnode_param *dvp = &op->file[0]; in yfs_deliver_fs_remove_file2()
646 struct afs_vnode_param *vp = &op->file[1]; in yfs_deliver_fs_remove_file2()
651 _enter("{%u}", call->unmarshall); in yfs_deliver_fs_remove_file2()
657 bp = call->buffer; in yfs_deliver_fs_remove_file2()
658 xdr_decode_YFSFetchStatus(&bp, call, &dvp->scb); in yfs_deliver_fs_remove_file2()
660 xdr_decode_YFSFetchStatus(&bp, call, &vp->scb); in yfs_deliver_fs_remove_file2()
661 /* Was deleted if vnode->status.abort_code == VNOVNODE. */ in yfs_deliver_fs_remove_file2()
663 xdr_decode_YFSVolSync(&bp, &op->volsync); in yfs_deliver_fs_remove_file2()
669 if (call->error == -ECONNABORTED && in yfs_done_fs_remove_file2()
670 (call->abort_code == RX_INVALID_OPERATION || in yfs_done_fs_remove_file2()
671 call->abort_code == RXGEN_OPCODE)) { in yfs_done_fs_remove_file2()
672 set_bit(AFS_SERVER_FL_NO_RM2, &call->op->server->flags); in yfs_done_fs_remove_file2()
673 call->op->flags |= AFS_OPERATION_DOWNGRADE; in yfs_done_fs_remove_file2()
682 .op = yfs_FS_RemoveFile2,
691 void yfs_fs_remove_file2(struct afs_operation *op) in yfs_fs_remove_file2() argument
693 struct afs_vnode_param *dvp = &op->file[0]; in yfs_fs_remove_file2()
694 const struct qstr *name = &op->dentry->d_name; in yfs_fs_remove_file2()
700 call = afs_alloc_flat_call(op->net, &yfs_RXYFSRemoveFile2, in yfs_fs_remove_file2()
704 xdr_strlen(name->len), in yfs_fs_remove_file2()
710 return afs_op_nomem(op); in yfs_fs_remove_file2()
713 bp = call->request; in yfs_fs_remove_file2()
716 bp = xdr_encode_YFSFid(bp, &dvp->fid); in yfs_fs_remove_file2()
720 call->fid = dvp->fid; in yfs_fs_remove_file2()
721 trace_afs_make_fs_call1(call, &dvp->fid, name); in yfs_fs_remove_file2()
722 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_remove_file2()
730 struct afs_operation *op = call->op; in yfs_deliver_fs_remove() local
731 struct afs_vnode_param *dvp = &op->file[0]; in yfs_deliver_fs_remove()
735 _enter("{%u}", call->unmarshall); in yfs_deliver_fs_remove()
741 bp = call->buffer; in yfs_deliver_fs_remove()
742 xdr_decode_YFSFetchStatus(&bp, call, &dvp->scb); in yfs_deliver_fs_remove()
743 xdr_decode_YFSVolSync(&bp, &op->volsync); in yfs_deliver_fs_remove()
752 .op = yfs_FS_RemoveFile,
760 void yfs_fs_remove_file(struct afs_operation *op) in yfs_fs_remove_file() argument
762 const struct qstr *name = &op->dentry->d_name; in yfs_fs_remove_file()
763 struct afs_vnode_param *dvp = &op->file[0]; in yfs_fs_remove_file()
769 if (!test_bit(AFS_SERVER_FL_NO_RM2, &op->server->flags)) in yfs_fs_remove_file()
770 return yfs_fs_remove_file2(op); in yfs_fs_remove_file()
772 call = afs_alloc_flat_call(op->net, &yfs_RXYFSRemoveFile, in yfs_fs_remove_file()
776 xdr_strlen(name->len), in yfs_fs_remove_file()
780 return afs_op_nomem(op); in yfs_fs_remove_file()
783 bp = call->request; in yfs_fs_remove_file()
786 bp = xdr_encode_YFSFid(bp, &dvp->fid); in yfs_fs_remove_file()
790 call->fid = dvp->fid; in yfs_fs_remove_file()
791 trace_afs_make_fs_call1(call, &dvp->fid, name); in yfs_fs_remove_file()
792 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_remove_file()
797 .op = yfs_FS_RemoveDir,
805 void yfs_fs_remove_dir(struct afs_operation *op) in yfs_fs_remove_dir() argument
807 const struct qstr *name = &op->dentry->d_name; in yfs_fs_remove_dir()
808 struct afs_vnode_param *dvp = &op->file[0]; in yfs_fs_remove_dir()
814 call = afs_alloc_flat_call(op->net, &yfs_RXYFSRemoveDir, in yfs_fs_remove_dir()
818 xdr_strlen(name->len), in yfs_fs_remove_dir()
822 return afs_op_nomem(op); in yfs_fs_remove_dir()
825 bp = call->request; in yfs_fs_remove_dir()
828 bp = xdr_encode_YFSFid(bp, &dvp->fid); in yfs_fs_remove_dir()
832 call->fid = dvp->fid; in yfs_fs_remove_dir()
833 trace_afs_make_fs_call1(call, &dvp->fid, name); in yfs_fs_remove_dir()
834 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_remove_dir()
842 struct afs_operation *op = call->op; in yfs_deliver_fs_link() local
843 struct afs_vnode_param *dvp = &op->file[0]; in yfs_deliver_fs_link()
844 struct afs_vnode_param *vp = &op->file[1]; in yfs_deliver_fs_link()
848 _enter("{%u}", call->unmarshall); in yfs_deliver_fs_link()
854 bp = call->buffer; in yfs_deliver_fs_link()
855 xdr_decode_YFSFetchStatus(&bp, call, &vp->scb); in yfs_deliver_fs_link()
856 xdr_decode_YFSFetchStatus(&bp, call, &dvp->scb); in yfs_deliver_fs_link()
857 xdr_decode_YFSVolSync(&bp, &op->volsync); in yfs_deliver_fs_link()
867 .op = yfs_FS_Link,
875 void yfs_fs_link(struct afs_operation *op) in yfs_fs_link() argument
877 const struct qstr *name = &op->dentry->d_name; in yfs_fs_link()
878 struct afs_vnode_param *dvp = &op->file[0]; in yfs_fs_link()
879 struct afs_vnode_param *vp = &op->file[1]; in yfs_fs_link()
885 call = afs_alloc_flat_call(op->net, &yfs_RXYFSLink, in yfs_fs_link()
889 xdr_strlen(name->len) + in yfs_fs_link()
895 return afs_op_nomem(op); in yfs_fs_link()
898 bp = call->request; in yfs_fs_link()
901 bp = xdr_encode_YFSFid(bp, &dvp->fid); in yfs_fs_link()
903 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_link()
906 call->fid = vp->fid; in yfs_fs_link()
907 trace_afs_make_fs_call1(call, &vp->fid, name); in yfs_fs_link()
908 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_link()
916 struct afs_operation *op = call->op; in yfs_deliver_fs_symlink() local
917 struct afs_vnode_param *dvp = &op->file[0]; in yfs_deliver_fs_symlink()
918 struct afs_vnode_param *vp = &op->file[1]; in yfs_deliver_fs_symlink()
922 _enter("{%u}", call->unmarshall); in yfs_deliver_fs_symlink()
929 bp = call->buffer; in yfs_deliver_fs_symlink()
930 xdr_decode_YFSFid(&bp, &vp->fid); in yfs_deliver_fs_symlink()
931 xdr_decode_YFSFetchStatus(&bp, call, &vp->scb); in yfs_deliver_fs_symlink()
932 xdr_decode_YFSFetchStatus(&bp, call, &dvp->scb); in yfs_deliver_fs_symlink()
933 xdr_decode_YFSVolSync(&bp, &op->volsync); in yfs_deliver_fs_symlink()
944 .op = yfs_FS_Symlink,
952 void yfs_fs_symlink(struct afs_operation *op) in yfs_fs_symlink() argument
954 const struct qstr *name = &op->dentry->d_name; in yfs_fs_symlink()
955 struct afs_vnode_param *dvp = &op->file[0]; in yfs_fs_symlink()
958 mode_t mode = 0777; in yfs_fs_symlink() local
963 contents_sz = strlen(op->create.symlink); in yfs_fs_symlink()
964 call = afs_alloc_flat_call(op->net, &yfs_RXYFSSymlink, in yfs_fs_symlink()
968 xdr_strlen(name->len) + in yfs_fs_symlink()
976 return afs_op_nomem(op); in yfs_fs_symlink()
979 bp = call->request; in yfs_fs_symlink()
982 bp = xdr_encode_YFSFid(bp, &dvp->fid); in yfs_fs_symlink()
984 bp = xdr_encode_string(bp, op->create.symlink, contents_sz); in yfs_fs_symlink()
985 bp = xdr_encode_YFSStoreStatus(bp, &mode, &op->mtime); in yfs_fs_symlink()
988 call->fid = dvp->fid; in yfs_fs_symlink()
989 trace_afs_make_fs_call1(call, &dvp->fid, name); in yfs_fs_symlink()
990 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_symlink()
998 struct afs_operation *op = call->op; in yfs_deliver_fs_rename() local
999 struct afs_vnode_param *orig_dvp = &op->file[0]; in yfs_deliver_fs_rename()
1000 struct afs_vnode_param *new_dvp = &op->file[1]; in yfs_deliver_fs_rename()
1004 _enter("{%u}", call->unmarshall); in yfs_deliver_fs_rename()
1010 bp = call->buffer; in yfs_deliver_fs_rename()
1014 xdr_decode_YFSFetchStatus(&bp, call, &orig_dvp->scb); in yfs_deliver_fs_rename()
1015 xdr_decode_YFSFetchStatus(&bp, call, &new_dvp->scb); in yfs_deliver_fs_rename()
1016 xdr_decode_YFSVolSync(&bp, &op->volsync); in yfs_deliver_fs_rename()
1026 .op = yfs_FS_Rename,
1034 void yfs_fs_rename(struct afs_operation *op) in yfs_fs_rename() argument
1036 struct afs_vnode_param *orig_dvp = &op->file[0]; in yfs_fs_rename()
1037 struct afs_vnode_param *new_dvp = &op->file[1]; in yfs_fs_rename()
1038 const struct qstr *orig_name = &op->dentry->d_name; in yfs_fs_rename()
1039 const struct qstr *new_name = &op->dentry_2->d_name; in yfs_fs_rename()
1045 call = afs_alloc_flat_call(op->net, &yfs_RXYFSRename, in yfs_fs_rename()
1049 xdr_strlen(orig_name->len) + in yfs_fs_rename()
1051 xdr_strlen(new_name->len), in yfs_fs_rename()
1056 return afs_op_nomem(op); in yfs_fs_rename()
1059 bp = call->request; in yfs_fs_rename()
1062 bp = xdr_encode_YFSFid(bp, &orig_dvp->fid); in yfs_fs_rename()
1064 bp = xdr_encode_YFSFid(bp, &new_dvp->fid); in yfs_fs_rename()
1068 call->fid = orig_dvp->fid; in yfs_fs_rename()
1069 trace_afs_make_fs_call2(call, &orig_dvp->fid, orig_name, new_name); in yfs_fs_rename()
1070 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_rename()
1078 .op = yfs_FS_StoreData64,
1086 void yfs_fs_store_data(struct afs_operation *op) in yfs_fs_store_data() argument
1088 struct afs_vnode_param *vp = &op->file[0]; in yfs_fs_store_data()
1093 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in yfs_fs_store_data()
1096 (unsigned long long)op->store.size, in yfs_fs_store_data()
1097 (unsigned long long)op->store.pos, in yfs_fs_store_data()
1098 (unsigned long long)op->store.i_size); in yfs_fs_store_data()
1100 call = afs_alloc_flat_call(op->net, &yfs_RXYFSStoreData64, in yfs_fs_store_data()
1109 return afs_op_nomem(op); in yfs_fs_store_data()
1111 call->write_iter = op->store.write_iter; in yfs_fs_store_data()
1114 bp = call->request; in yfs_fs_store_data()
1117 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_store_data()
1118 bp = xdr_encode_YFSStoreStatus(bp, NULL, &op->mtime); in yfs_fs_store_data()
1119 bp = xdr_encode_u64(bp, op->store.pos); in yfs_fs_store_data()
1120 bp = xdr_encode_u64(bp, op->store.size); in yfs_fs_store_data()
1121 bp = xdr_encode_u64(bp, op->store.i_size); in yfs_fs_store_data()
1124 call->fid = vp->fid; in yfs_fs_store_data()
1125 trace_afs_make_fs_call(call, &vp->fid); in yfs_fs_store_data()
1126 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_store_data()
1134 .op = yfs_FS_StoreStatus,
1141 .op = yfs_FS_StoreData64,
1150 static void yfs_fs_setattr_size(struct afs_operation *op) in yfs_fs_setattr_size() argument
1152 struct afs_vnode_param *vp = &op->file[0]; in yfs_fs_setattr_size()
1154 struct iattr *attr = op->setattr.attr; in yfs_fs_setattr_size()
1158 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in yfs_fs_setattr_size()
1160 call = afs_alloc_flat_call(op->net, &yfs_RXYFSStoreData64_as_Status, in yfs_fs_setattr_size()
1168 return afs_op_nomem(op); in yfs_fs_setattr_size()
1171 bp = call->request; in yfs_fs_setattr_size()
1174 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_setattr_size()
1176 bp = xdr_encode_u64(bp, attr->ia_size); /* position of start of write */ in yfs_fs_setattr_size()
1178 bp = xdr_encode_u64(bp, attr->ia_size); /* new file length */ in yfs_fs_setattr_size()
1181 call->fid = vp->fid; in yfs_fs_setattr_size()
1182 trace_afs_make_fs_call(call, &vp->fid); in yfs_fs_setattr_size()
1183 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_setattr_size()
1190 void yfs_fs_setattr(struct afs_operation *op) in yfs_fs_setattr() argument
1192 struct afs_vnode_param *vp = &op->file[0]; in yfs_fs_setattr()
1194 struct iattr *attr = op->setattr.attr; in yfs_fs_setattr()
1197 if (attr->ia_valid & ATTR_SIZE) in yfs_fs_setattr()
1198 return yfs_fs_setattr_size(op); in yfs_fs_setattr()
1201 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in yfs_fs_setattr()
1203 call = afs_alloc_flat_call(op->net, &yfs_RXYFSStoreStatus, in yfs_fs_setattr()
1210 return afs_op_nomem(op); in yfs_fs_setattr()
1213 bp = call->request; in yfs_fs_setattr()
1216 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_setattr()
1220 call->fid = vp->fid; in yfs_fs_setattr()
1221 trace_afs_make_fs_call(call, &vp->fid); in yfs_fs_setattr()
1222 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_setattr()
1230 struct afs_operation *op = call->op; in yfs_deliver_fs_get_volume_status() local
1236 _enter("{%u}", call->unmarshall); in yfs_deliver_fs_get_volume_status()
1238 switch (call->unmarshall) { in yfs_deliver_fs_get_volume_status()
1240 call->unmarshall++; in yfs_deliver_fs_get_volume_status()
1251 bp = call->buffer; in yfs_deliver_fs_get_volume_status()
1252 xdr_decode_YFSFetchVolumeStatus(&bp, &op->volstatus.vs); in yfs_deliver_fs_get_volume_status()
1253 call->unmarshall++; in yfs_deliver_fs_get_volume_status()
1263 call->count = ntohl(call->tmp); in yfs_deliver_fs_get_volume_status()
1264 _debug("volname length: %u", call->count); in yfs_deliver_fs_get_volume_status()
1265 if (call->count >= AFSNAMEMAX) in yfs_deliver_fs_get_volume_status()
1267 size = (call->count + 3) & ~3; /* It's padded */ in yfs_deliver_fs_get_volume_status()
1269 call->unmarshall++; in yfs_deliver_fs_get_volume_status()
1279 p = call->buffer; in yfs_deliver_fs_get_volume_status()
1280 p[call->count] = 0; in yfs_deliver_fs_get_volume_status()
1283 call->unmarshall++; in yfs_deliver_fs_get_volume_status()
1292 call->count = ntohl(call->tmp); in yfs_deliver_fs_get_volume_status()
1293 _debug("offline msg length: %u", call->count); in yfs_deliver_fs_get_volume_status()
1294 if (call->count >= AFSNAMEMAX) in yfs_deliver_fs_get_volume_status()
1296 size = (call->count + 3) & ~3; /* It's padded */ in yfs_deliver_fs_get_volume_status()
1298 call->unmarshall++; in yfs_deliver_fs_get_volume_status()
1308 p = call->buffer; in yfs_deliver_fs_get_volume_status()
1309 p[call->count] = 0; in yfs_deliver_fs_get_volume_status()
1313 call->unmarshall++; in yfs_deliver_fs_get_volume_status()
1322 call->count = ntohl(call->tmp); in yfs_deliver_fs_get_volume_status()
1323 _debug("motd length: %u", call->count); in yfs_deliver_fs_get_volume_status()
1324 if (call->count >= AFSNAMEMAX) in yfs_deliver_fs_get_volume_status()
1326 size = (call->count + 3) & ~3; /* It's padded */ in yfs_deliver_fs_get_volume_status()
1328 call->unmarshall++; in yfs_deliver_fs_get_volume_status()
1338 p = call->buffer; in yfs_deliver_fs_get_volume_status()
1339 p[call->count] = 0; in yfs_deliver_fs_get_volume_status()
1342 call->unmarshall++; in yfs_deliver_fs_get_volume_status()
1358 .op = yfs_FS_GetVolumeStatus,
1366 void yfs_fs_get_volume_status(struct afs_operation *op) in yfs_fs_get_volume_status() argument
1368 struct afs_vnode_param *vp = &op->file[0]; in yfs_fs_get_volume_status()
1374 call = afs_alloc_flat_call(op->net, &yfs_RXYFSGetVolumeStatus, in yfs_fs_get_volume_status()
1382 return afs_op_nomem(op); in yfs_fs_get_volume_status()
1385 bp = call->request; in yfs_fs_get_volume_status()
1388 bp = xdr_encode_u64(bp, vp->fid.vid); in yfs_fs_get_volume_status()
1391 call->fid = vp->fid; in yfs_fs_get_volume_status()
1392 trace_afs_make_fs_call(call, &vp->fid); in yfs_fs_get_volume_status()
1393 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_get_volume_status()
1401 .op = yfs_FS_SetLock,
1412 .op = yfs_FS_ExtendLock,
1423 .op = yfs_FS_ReleaseLock,
1431 void yfs_fs_set_lock(struct afs_operation *op) in yfs_fs_set_lock() argument
1433 struct afs_vnode_param *vp = &op->file[0]; in yfs_fs_set_lock()
1439 call = afs_alloc_flat_call(op->net, &yfs_RXYFSSetLock, in yfs_fs_set_lock()
1446 return afs_op_nomem(op); in yfs_fs_set_lock()
1449 bp = call->request; in yfs_fs_set_lock()
1452 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_set_lock()
1453 bp = xdr_encode_u32(bp, op->lock.type); in yfs_fs_set_lock()
1456 call->fid = vp->fid; in yfs_fs_set_lock()
1457 trace_afs_make_fs_calli(call, &vp->fid, op->lock.type); in yfs_fs_set_lock()
1458 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_set_lock()
1464 void yfs_fs_extend_lock(struct afs_operation *op) in yfs_fs_extend_lock() argument
1466 struct afs_vnode_param *vp = &op->file[0]; in yfs_fs_extend_lock()
1472 call = afs_alloc_flat_call(op->net, &yfs_RXYFSExtendLock, in yfs_fs_extend_lock()
1478 return afs_op_nomem(op); in yfs_fs_extend_lock()
1481 bp = call->request; in yfs_fs_extend_lock()
1484 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_extend_lock()
1487 call->fid = vp->fid; in yfs_fs_extend_lock()
1488 trace_afs_make_fs_call(call, &vp->fid); in yfs_fs_extend_lock()
1489 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_extend_lock()
1495 void yfs_fs_release_lock(struct afs_operation *op) in yfs_fs_release_lock() argument
1497 struct afs_vnode_param *vp = &op->file[0]; in yfs_fs_release_lock()
1503 call = afs_alloc_flat_call(op->net, &yfs_RXYFSReleaseLock, in yfs_fs_release_lock()
1509 return afs_op_nomem(op); in yfs_fs_release_lock()
1512 bp = call->request; in yfs_fs_release_lock()
1515 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_release_lock()
1518 call->fid = vp->fid; in yfs_fs_release_lock()
1519 trace_afs_make_fs_call(call, &vp->fid); in yfs_fs_release_lock()
1520 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_release_lock()
1528 struct afs_operation *op = call->op; in yfs_deliver_fs_fetch_status() local
1529 struct afs_vnode_param *vp = &op->file[op->fetch_status.which]; in yfs_deliver_fs_fetch_status()
1538 bp = call->buffer; in yfs_deliver_fs_fetch_status()
1539 xdr_decode_YFSFetchStatus(&bp, call, &vp->scb); in yfs_deliver_fs_fetch_status()
1540 xdr_decode_YFSCallBack(&bp, call, &vp->scb); in yfs_deliver_fs_fetch_status()
1541 xdr_decode_YFSVolSync(&bp, &op->volsync); in yfs_deliver_fs_fetch_status()
1552 .op = yfs_FS_FetchStatus,
1560 void yfs_fs_fetch_status(struct afs_operation *op) in yfs_fs_fetch_status() argument
1562 struct afs_vnode_param *vp = &op->file[op->fetch_status.which]; in yfs_fs_fetch_status()
1567 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in yfs_fs_fetch_status()
1569 call = afs_alloc_flat_call(op->net, &yfs_RXYFSFetchStatus, in yfs_fs_fetch_status()
1576 return afs_op_nomem(op); in yfs_fs_fetch_status()
1579 bp = call->request; in yfs_fs_fetch_status()
1582 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_fetch_status()
1585 call->fid = vp->fid; in yfs_fs_fetch_status()
1586 trace_afs_make_fs_call(call, &vp->fid); in yfs_fs_fetch_status()
1587 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_fetch_status()
1595 struct afs_operation *op = call->op; in yfs_deliver_fs_inline_bulk_status() local
1601 _enter("{%u}", call->unmarshall); in yfs_deliver_fs_inline_bulk_status()
1603 switch (call->unmarshall) { in yfs_deliver_fs_inline_bulk_status()
1606 call->unmarshall++; in yfs_deliver_fs_inline_bulk_status()
1616 tmp = ntohl(call->tmp); in yfs_deliver_fs_inline_bulk_status()
1617 _debug("status count: %u/%u", tmp, op->nr_files); in yfs_deliver_fs_inline_bulk_status()
1618 if (tmp != op->nr_files) in yfs_deliver_fs_inline_bulk_status()
1621 call->count = 0; in yfs_deliver_fs_inline_bulk_status()
1622 call->unmarshall++; in yfs_deliver_fs_inline_bulk_status()
1628 _debug("extract status array %u", call->count); in yfs_deliver_fs_inline_bulk_status()
1633 switch (call->count) { in yfs_deliver_fs_inline_bulk_status()
1635 scb = &op->file[0].scb; in yfs_deliver_fs_inline_bulk_status()
1638 scb = &op->file[1].scb; in yfs_deliver_fs_inline_bulk_status()
1641 scb = &op->more_files[call->count - 2].scb; in yfs_deliver_fs_inline_bulk_status()
1645 bp = call->buffer; in yfs_deliver_fs_inline_bulk_status()
1648 call->count++; in yfs_deliver_fs_inline_bulk_status()
1649 if (call->count < op->nr_files) in yfs_deliver_fs_inline_bulk_status()
1652 call->count = 0; in yfs_deliver_fs_inline_bulk_status()
1653 call->unmarshall++; in yfs_deliver_fs_inline_bulk_status()
1664 tmp = ntohl(call->tmp); in yfs_deliver_fs_inline_bulk_status()
1666 if (tmp != op->nr_files) in yfs_deliver_fs_inline_bulk_status()
1668 call->count = 0; in yfs_deliver_fs_inline_bulk_status()
1669 call->unmarshall++; in yfs_deliver_fs_inline_bulk_status()
1681 switch (call->count) { in yfs_deliver_fs_inline_bulk_status()
1683 scb = &op->file[0].scb; in yfs_deliver_fs_inline_bulk_status()
1686 scb = &op->file[1].scb; in yfs_deliver_fs_inline_bulk_status()
1689 scb = &op->more_files[call->count - 2].scb; in yfs_deliver_fs_inline_bulk_status()
1693 bp = call->buffer; in yfs_deliver_fs_inline_bulk_status()
1695 call->count++; in yfs_deliver_fs_inline_bulk_status()
1696 if (call->count < op->nr_files) in yfs_deliver_fs_inline_bulk_status()
1700 call->unmarshall++; in yfs_deliver_fs_inline_bulk_status()
1708 bp = call->buffer; in yfs_deliver_fs_inline_bulk_status()
1709 xdr_decode_YFSVolSync(&bp, &op->volsync); in yfs_deliver_fs_inline_bulk_status()
1711 call->unmarshall++; in yfs_deliver_fs_inline_bulk_status()
1727 .op = yfs_FS_InlineBulkStatus,
1735 void yfs_fs_inline_bulk_status(struct afs_operation *op) in yfs_fs_inline_bulk_status() argument
1737 struct afs_vnode_param *dvp = &op->file[0]; in yfs_fs_inline_bulk_status()
1738 struct afs_vnode_param *vp = &op->file[1]; in yfs_fs_inline_bulk_status()
1744 key_serial(op->key), vp->fid.vid, vp->fid.vnode, op->nr_files); in yfs_fs_inline_bulk_status()
1746 call = afs_alloc_flat_call(op->net, &yfs_RXYFSInlineBulkStatus, in yfs_fs_inline_bulk_status()
1750 sizeof(struct yfs_xdr_YFSFid) * op->nr_files, in yfs_fs_inline_bulk_status()
1753 return afs_op_nomem(op); in yfs_fs_inline_bulk_status()
1756 bp = call->request; in yfs_fs_inline_bulk_status()
1759 bp = xdr_encode_u32(bp, op->nr_files); in yfs_fs_inline_bulk_status()
1760 bp = xdr_encode_YFSFid(bp, &dvp->fid); in yfs_fs_inline_bulk_status()
1761 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_inline_bulk_status()
1762 for (i = 0; i < op->nr_files - 2; i++) in yfs_fs_inline_bulk_status()
1763 bp = xdr_encode_YFSFid(bp, &op->more_files[i].fid); in yfs_fs_inline_bulk_status()
1766 call->fid = vp->fid; in yfs_fs_inline_bulk_status()
1767 trace_afs_make_fs_call(call, &vp->fid); in yfs_fs_inline_bulk_status()
1768 afs_make_op_call(op, call, GFP_NOFS); in yfs_fs_inline_bulk_status()
1776 struct afs_operation *op = call->op; in yfs_deliver_fs_fetch_opaque_acl() local
1777 struct afs_vnode_param *vp = &op->file[0]; in yfs_deliver_fs_fetch_opaque_acl()
1778 struct yfs_acl *yacl = op->yacl; in yfs_deliver_fs_fetch_opaque_acl()
1784 _enter("{%u}", call->unmarshall); in yfs_deliver_fs_fetch_opaque_acl()
1786 switch (call->unmarshall) { in yfs_deliver_fs_fetch_opaque_acl()
1789 call->unmarshall++; in yfs_deliver_fs_fetch_opaque_acl()
1798 size = call->count2 = ntohl(call->tmp); in yfs_deliver_fs_fetch_opaque_acl()
1801 if (yacl->flags & YFS_ACL_WANT_ACL) { in yfs_deliver_fs_fetch_opaque_acl()
1804 return -ENOMEM; in yfs_deliver_fs_fetch_opaque_acl()
1805 yacl->acl = acl; in yfs_deliver_fs_fetch_opaque_acl()
1806 acl->size = call->count2; in yfs_deliver_fs_fetch_opaque_acl()
1807 afs_extract_begin(call, acl->data, size); in yfs_deliver_fs_fetch_opaque_acl()
1811 call->unmarshall++; in yfs_deliver_fs_fetch_opaque_acl()
1821 call->unmarshall++; in yfs_deliver_fs_fetch_opaque_acl()
1830 size = call->count2 = ntohl(call->tmp); in yfs_deliver_fs_fetch_opaque_acl()
1833 if (yacl->flags & YFS_ACL_WANT_VOL_ACL) { in yfs_deliver_fs_fetch_opaque_acl()
1836 return -ENOMEM; in yfs_deliver_fs_fetch_opaque_acl()
1837 yacl->vol_acl = acl; in yfs_deliver_fs_fetch_opaque_acl()
1838 acl->size = call->count2; in yfs_deliver_fs_fetch_opaque_acl()
1839 afs_extract_begin(call, acl->data, size); in yfs_deliver_fs_fetch_opaque_acl()
1843 call->unmarshall++; in yfs_deliver_fs_fetch_opaque_acl()
1856 call->unmarshall++; in yfs_deliver_fs_fetch_opaque_acl()
1865 bp = call->buffer; in yfs_deliver_fs_fetch_opaque_acl()
1866 yacl->inherit_flag = ntohl(*bp++); in yfs_deliver_fs_fetch_opaque_acl()
1867 yacl->num_cleaned = ntohl(*bp++); in yfs_deliver_fs_fetch_opaque_acl()
1868 xdr_decode_YFSFetchStatus(&bp, call, &vp->scb); in yfs_deliver_fs_fetch_opaque_acl()
1869 xdr_decode_YFSVolSync(&bp, &op->volsync); in yfs_deliver_fs_fetch_opaque_acl()
1871 call->unmarshall++; in yfs_deliver_fs_fetch_opaque_acl()
1885 kfree(yacl->acl); in yfs_free_opaque_acl()
1886 kfree(yacl->vol_acl); in yfs_free_opaque_acl()
1896 .op = yfs_FS_FetchOpaqueACL,
1904 void yfs_fs_fetch_opaque_acl(struct afs_operation *op) in yfs_fs_fetch_opaque_acl() argument
1906 struct afs_vnode_param *vp = &op->file[0]; in yfs_fs_fetch_opaque_acl()
1911 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in yfs_fs_fetch_opaque_acl()
1913 call = afs_alloc_flat_call(op->net, &yfs_RXYFSFetchOpaqueACL, in yfs_fs_fetch_opaque_acl()
1920 return afs_op_nomem(op); in yfs_fs_fetch_opaque_acl()
1923 bp = call->request; in yfs_fs_fetch_opaque_acl()
1926 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_fetch_opaque_acl()
1929 call->fid = vp->fid; in yfs_fs_fetch_opaque_acl()
1930 trace_afs_make_fs_call(call, &vp->fid); in yfs_fs_fetch_opaque_acl()
1931 afs_make_op_call(op, call, GFP_KERNEL); in yfs_fs_fetch_opaque_acl()
1939 .op = yfs_FS_StoreOpaqueACL2,
1947 void yfs_fs_store_opaque_acl2(struct afs_operation *op) in yfs_fs_store_opaque_acl2() argument
1949 struct afs_vnode_param *vp = &op->file[0]; in yfs_fs_store_opaque_acl2()
1951 struct afs_acl *acl = op->acl; in yfs_fs_store_opaque_acl2()
1956 key_serial(op->key), vp->fid.vid, vp->fid.vnode); in yfs_fs_store_opaque_acl2()
1958 size = round_up(acl->size, 4); in yfs_fs_store_opaque_acl2()
1959 call = afs_alloc_flat_call(op->net, &yfs_RXYFSStoreOpaqueACL2, in yfs_fs_store_opaque_acl2()
1966 return afs_op_nomem(op); in yfs_fs_store_opaque_acl2()
1969 bp = call->request; in yfs_fs_store_opaque_acl2()
1972 bp = xdr_encode_YFSFid(bp, &vp->fid); in yfs_fs_store_opaque_acl2()
1973 bp = xdr_encode_u32(bp, acl->size); in yfs_fs_store_opaque_acl2()
1974 memcpy(bp, acl->data, acl->size); in yfs_fs_store_opaque_acl2()
1975 if (acl->size != size) in yfs_fs_store_opaque_acl2()
1976 memset((void *)bp + acl->size, 0, size - acl->size); in yfs_fs_store_opaque_acl2()
1980 call->fid = vp->fid; in yfs_fs_store_opaque_acl2()
1981 trace_afs_make_fs_call(call, &vp->fid); in yfs_fs_store_opaque_acl2()
1982 afs_make_op_call(op, call, GFP_KERNEL); in yfs_fs_store_opaque_acl2()