Lines Matching full:call

55 				      struct afs_call *call,  in xdr_decode_AFSFetchStatus()  argument
60 bool inline_error = (call->operation_ID == afs_FS_InlineBulkStatus); in xdr_decode_AFSFetchStatus()
128 afs_protocol_error(call, afs_eproto_bad_status); in xdr_decode_AFSFetchStatus()
132 static time64_t xdr_decode_expiry(struct afs_call *call, u32 expiry) in xdr_decode_expiry() argument
134 return ktime_divns(call->issue_time, NSEC_PER_SEC) + expiry; in xdr_decode_expiry()
138 struct afs_call *call, in xdr_decode_AFSCallBack() argument
145 cb->expires_at = xdr_decode_expiry(call, ntohl(*bp++)); in xdr_decode_AFSCallBack()
238 static int afs_deliver_fs_fetch_status(struct afs_call *call) in afs_deliver_fs_fetch_status() argument
240 struct afs_operation *op = call->op; in afs_deliver_fs_fetch_status()
245 ret = afs_transfer_reply(call); in afs_deliver_fs_fetch_status()
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()
275 struct afs_call *call; in afs_fs_fetch_status() local
281 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchStatus, in afs_fs_fetch_status()
283 if (!call) in afs_fs_fetch_status()
287 bp = call->request; 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()
295 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_fetch_status()
301 static int afs_deliver_fs_fetch_data(struct afs_call *call) in afs_deliver_fs_fetch_data() argument
303 struct afs_operation *op = call->op; in afs_deliver_fs_fetch_data()
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()
319 afs_extract_to_tmp64(call); in afs_deliver_fs_fetch_data()
321 call->tmp_u = htonl(0); in afs_deliver_fs_fetch_data()
322 afs_extract_to_tmp(call); in afs_deliver_fs_fetch_data()
332 ret = afs_extract_data(call, true); 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()
352 ret = afs_extract_data(call, true); 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()
371 ret = afs_extract_data(call, true); in afs_deliver_fs_fetch_data()
376 call->unmarshall = 4; in afs_deliver_fs_fetch_data()
377 afs_extract_to_buf(call, (21 + 3 + 6) * 4); in afs_deliver_fs_fetch_data()
382 ret = afs_extract_data(call, false); 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()
394 call->unmarshall++; in afs_deliver_fs_fetch_data()
433 struct afs_call *call; 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()
439 if (!call) in afs_fs_fetch_data64()
443 call->async = true; in afs_fs_fetch_data64()
446 bp = call->request; 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()
458 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_fetch_data64()
468 struct afs_call *call; in afs_fs_fetch_data() local
476 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchData, 24, (21 + 3 + 6) * 4); in afs_fs_fetch_data()
477 if (!call) in afs_fs_fetch_data()
481 bp = call->request; 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()
491 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_fetch_data()
497 static int afs_deliver_fs_create_vnode(struct afs_call *call) in afs_deliver_fs_create_vnode() argument
499 struct afs_operation *op = call->op; in afs_deliver_fs_create_vnode()
505 ret = afs_transfer_reply(call); in afs_deliver_fs_create_vnode()
510 bp = call->buffer; 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()
538 struct afs_call *call; in afs_fs_create_file() local
548 call = afs_alloc_flat_call(op->net, &afs_RXFSCreateFile, in afs_fs_create_file()
550 if (!call) in afs_fs_create_file()
554 bp = call->request; 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()
575 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_create_file()
592 struct afs_call *call; in afs_fs_make_dir() local
602 call = afs_alloc_flat_call(op->net, &afs_RXFSMakeDir, in afs_fs_make_dir()
604 if (!call) in afs_fs_make_dir()
608 bp = call->request; 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()
629 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_make_dir()
635 static int afs_deliver_fs_file_status_and_vol(struct afs_call *call) in afs_deliver_fs_file_status_and_vol() argument
637 struct afs_operation *op = call->op; in afs_deliver_fs_file_status_and_vol()
642 ret = afs_transfer_reply(call); in afs_deliver_fs_file_status_and_vol()
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()
672 struct afs_call *call; in afs_fs_remove_file() local
682 call = afs_alloc_flat_call(op->net, &afs_RXFSRemoveFile, in afs_fs_remove_file()
684 if (!call) in afs_fs_remove_file()
688 bp = call->request; 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()
703 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_remove_file()
720 struct afs_call *call; in afs_fs_remove_dir() local
730 call = afs_alloc_flat_call(op->net, &afs_RXFSRemoveDir, in afs_fs_remove_dir()
732 if (!call) in afs_fs_remove_dir()
736 bp = call->request; 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()
751 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_remove_dir()
757 static int afs_deliver_fs_link(struct afs_call *call) in afs_deliver_fs_link() argument
759 struct afs_operation *op = call->op; in afs_deliver_fs_link()
765 _enter("{%u}", call->unmarshall); in afs_deliver_fs_link()
767 ret = afs_transfer_reply(call); 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()
799 struct afs_call *call; in afs_fs_link() local
809 call = afs_alloc_flat_call(op->net, &afs_RXFSLink, reqsz, (21 + 21 + 6) * 4); in afs_fs_link()
810 if (!call) in afs_fs_link()
814 bp = call->request; 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()
832 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_link()
838 static int afs_deliver_fs_symlink(struct afs_call *call) in afs_deliver_fs_symlink() argument
840 struct afs_operation *op = call->op; in afs_deliver_fs_symlink()
846 _enter("{%u}", call->unmarshall); in afs_deliver_fs_symlink()
848 ret = afs_transfer_reply(call); in afs_deliver_fs_symlink()
853 bp = call->buffer; 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()
880 struct afs_call *call; in afs_fs_symlink() local
894 call = afs_alloc_flat_call(op->net, &afs_RXFSSymlink, reqsz, in afs_fs_symlink()
896 if (!call) in afs_fs_symlink()
900 bp = call->request; 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()
928 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_symlink()
934 static int afs_deliver_fs_rename(struct afs_call *call) in afs_deliver_fs_rename() argument
936 struct afs_operation *op = call->op; in afs_deliver_fs_rename()
942 ret = afs_transfer_reply(call); 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()
977 struct afs_call *call; in afs_fs_rename() local
994 call = afs_alloc_flat_call(op->net, &afs_RXFSRename, reqsz, (21 + 21 + 6) * 4); in afs_fs_rename()
995 if (!call) in afs_fs_rename()
999 bp = call->request; 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()
1025 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_rename()
1031 static int afs_deliver_fs_store_data(struct afs_call *call) in afs_deliver_fs_store_data() argument
1033 struct afs_operation *op = call->op; in afs_deliver_fs_store_data()
1040 ret = afs_transfer_reply(call); in afs_deliver_fs_store_data()
1045 bp = call->buffer; in afs_deliver_fs_store_data()
1046 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb); in afs_deliver_fs_store_data()
1076 struct afs_call *call; in afs_fs_store_data64() local
1082 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData64, in afs_fs_store_data64()
1085 if (!call) 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()
1111 call->fid = vp->fid; in afs_fs_store_data64()
1112 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_store_data64()
1113 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_store_data64()
1122 struct afs_call *call; in afs_fs_store_data() local
1136 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData, in afs_fs_store_data()
1139 if (!call) 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()
1162 call->fid = vp->fid; in afs_fs_store_data()
1163 trace_afs_make_fs_call(call, &vp->fid); in afs_fs_store_data()
1164 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_store_data()
1198 struct afs_call *call; in afs_fs_setattr_size64() local
1207 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData64_as_Status, in afs_fs_setattr_size64()
1210 if (!call) in afs_fs_setattr_size64()
1214 bp = call->request; 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()
1231 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_setattr_size64()
1241 struct afs_call *call; in afs_fs_setattr_size() local
1252 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData_as_Status, in afs_fs_setattr_size()
1255 if (!call) in afs_fs_setattr_size()
1259 bp = call->request; 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()
1273 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_setattr_size()
1283 struct afs_call *call; in afs_fs_setattr() local
1293 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreStatus, in afs_fs_setattr()
1296 if (!call) in afs_fs_setattr()
1300 bp = call->request; 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()
1310 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_setattr()
1316 static int afs_deliver_fs_get_volume_status(struct afs_call *call) in afs_deliver_fs_get_volume_status() argument
1318 struct afs_operation *op = call->op; in afs_deliver_fs_get_volume_status()
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()
1329 afs_extract_to_buf(call, 12 * 4); in afs_deliver_fs_get_volume_status()
1335 ret = afs_extract_data(call, true); in afs_deliver_fs_get_volume_status()
1339 bp = call->buffer; in afs_deliver_fs_get_volume_status()
1341 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1342 afs_extract_to_tmp(call); in afs_deliver_fs_get_volume_status()
1347 ret = afs_extract_data(call, true); 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()
1354 return afs_protocol_error(call, afs_eproto_volname_len); in afs_deliver_fs_get_volume_status()
1355 size = (call->count + 3) & ~3; /* It's padded */ in afs_deliver_fs_get_volume_status()
1356 afs_extract_to_buf(call, size); in afs_deliver_fs_get_volume_status()
1357 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1363 ret = afs_extract_data(call, true); 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()
1370 afs_extract_to_tmp(call); in afs_deliver_fs_get_volume_status()
1371 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1376 ret = afs_extract_data(call, true); 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()
1383 return afs_protocol_error(call, afs_eproto_offline_msg_len); in afs_deliver_fs_get_volume_status()
1384 size = (call->count + 3) & ~3; /* It's padded */ in afs_deliver_fs_get_volume_status()
1385 afs_extract_to_buf(call, size); in afs_deliver_fs_get_volume_status()
1386 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1392 ret = afs_extract_data(call, true); 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()
1400 afs_extract_to_tmp(call); in afs_deliver_fs_get_volume_status()
1401 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1406 ret = afs_extract_data(call, true); 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()
1413 return afs_protocol_error(call, afs_eproto_motd_len); in afs_deliver_fs_get_volume_status()
1414 size = (call->count + 3) & ~3; /* It's padded */ in afs_deliver_fs_get_volume_status()
1415 afs_extract_to_buf(call, size); in afs_deliver_fs_get_volume_status()
1416 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1422 ret = afs_extract_data(call, false); 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()
1430 call->unmarshall++; in afs_deliver_fs_get_volume_status()
1457 struct afs_call *call; 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()
1464 if (!call) in afs_fs_get_volume_status()
1468 bp = call->request; 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()
1474 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_get_volume_status()
1480 static int afs_deliver_fs_xxxx_lock(struct afs_call *call) in afs_deliver_fs_xxxx_lock() argument
1482 struct afs_operation *op = call->op; in afs_deliver_fs_xxxx_lock()
1486 _enter("{%u}", call->unmarshall); in afs_deliver_fs_xxxx_lock()
1488 ret = afs_transfer_reply(call); in afs_deliver_fs_xxxx_lock()
1493 bp = call->buffer; in afs_deliver_fs_xxxx_lock()
1538 struct afs_call *call; 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()
1544 if (!call) in afs_fs_set_lock()
1548 bp = call->request; 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()
1557 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_set_lock()
1566 struct afs_call *call; 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()
1572 if (!call) in afs_fs_extend_lock()
1576 bp = call->request; 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()
1584 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_extend_lock()
1593 struct afs_call *call; 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()
1599 if (!call) in afs_fs_release_lock()
1603 bp = call->request; 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()
1611 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_release_lock()
1617 static int afs_deliver_fs_give_up_all_callbacks(struct afs_call *call) in afs_deliver_fs_give_up_all_callbacks() argument
1619 return afs_transfer_reply(call); in afs_deliver_fs_give_up_all_callbacks()
1638 struct afs_call *call; in afs_fs_give_up_all_callbacks() local
1644 call = afs_alloc_flat_call(net, &afs_RXFSGiveUpAllCallBacks, 1 * 4, 0); in afs_fs_give_up_all_callbacks()
1645 if (!call) 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()
1657 afs_make_call(call, GFP_NOFS); in afs_fs_give_up_all_callbacks()
1658 afs_wait_for_call_to_complete(call); 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()
1662 afs_put_call(call); in afs_fs_give_up_all_callbacks()
1669 static int afs_deliver_fs_get_capabilities(struct afs_call *call) in afs_deliver_fs_get_capabilities() argument
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()
1678 afs_extract_to_tmp(call); in afs_deliver_fs_get_capabilities()
1679 call->unmarshall++; in afs_deliver_fs_get_capabilities()
1684 ret = afs_extract_data(call, true); 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()
1698 afs_extract_to_tmp(call); in afs_deliver_fs_get_capabilities()
1699 call->unmarshall++; in afs_deliver_fs_get_capabilities()
1703 ret = afs_extract_data(call, false); 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()
1713 ret = afs_extract_data(call, false); in afs_deliver_fs_get_capabilities()
1717 call->unmarshall++; in afs_deliver_fs_get_capabilities()
1725 static void afs_fs_get_capabilities_destructor(struct afs_call *call) in afs_fs_get_capabilities_destructor() argument
1727 afs_put_endpoint_state(call->probe, afs_estate_trace_put_getcaps); in afs_fs_get_capabilities_destructor()
1728 afs_flat_call_destructor(call); in afs_fs_get_capabilities_destructor()
1746 * to allocate a call, true is returned the result is delivered through the
1753 struct afs_call *call; in afs_fs_get_capabilities() local
1758 call = afs_alloc_flat_call(net, &afs_RXFSGetCapabilities, 1 * 4, 16 * 4); in afs_fs_get_capabilities()
1759 if (!call) in afs_fs_get_capabilities()
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()
1776 trace_afs_make_fs_call(call, NULL); in afs_fs_get_capabilities()
1777 afs_make_call(call, GFP_NOFS); in afs_fs_get_capabilities()
1778 afs_put_call(call); in afs_fs_get_capabilities()
1783 * Deliver reply data to an FS.InlineBulkStatus call
1785 static int afs_deliver_fs_inline_bulk_status(struct afs_call *call) in afs_deliver_fs_inline_bulk_status() argument
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()
1797 afs_extract_to_tmp(call); in afs_deliver_fs_inline_bulk_status()
1798 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1804 ret = afs_extract_data(call, true); in afs_deliver_fs_inline_bulk_status()
1808 tmp = ntohl(call->tmp); in afs_deliver_fs_inline_bulk_status()
1811 return afs_protocol_error(call, afs_eproto_ibulkst_count); 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()
1816 afs_extract_to_buf(call, 21 * sizeof(__be32)); in afs_deliver_fs_inline_bulk_status()
1820 _debug("extract status array %u", call->count); in afs_deliver_fs_inline_bulk_status()
1821 ret = afs_extract_data(call, true); in afs_deliver_fs_inline_bulk_status()
1825 switch (call->count) { 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()
1838 xdr_decode_AFSFetchStatus(&bp, call, scb); 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()
1846 afs_extract_to_tmp(call); in afs_deliver_fs_inline_bulk_status()
1852 ret = afs_extract_data(call, true); in afs_deliver_fs_inline_bulk_status()
1856 tmp = ntohl(call->tmp); in afs_deliver_fs_inline_bulk_status()
1859 return afs_protocol_error(call, afs_eproto_ibulkst_cb_count); 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()
1863 afs_extract_to_buf(call, 3 * sizeof(__be32)); in afs_deliver_fs_inline_bulk_status()
1868 ret = afs_extract_data(call, true); in afs_deliver_fs_inline_bulk_status()
1873 switch (call->count) { 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()
1886 xdr_decode_AFSCallBack(&bp, call, scb); 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()
1891 afs_extract_to_buf(call, 6 * sizeof(__be32)); in afs_deliver_fs_inline_bulk_status()
1892 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1896 ret = afs_extract_data(call, false); in afs_deliver_fs_inline_bulk_status()
1900 bp = call->buffer; in afs_deliver_fs_inline_bulk_status()
1906 call->unmarshall++; in afs_deliver_fs_inline_bulk_status()
1917 static void afs_done_fs_inline_bulk_status(struct afs_call *call) in afs_done_fs_inline_bulk_status() argument
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()
1945 struct afs_call *call; in afs_fs_inline_bulk_status() local
1957 call = afs_alloc_flat_call(op->net, &afs_RXFSInlineBulkStatus, in afs_fs_inline_bulk_status()
1960 if (!call) in afs_fs_inline_bulk_status()
1964 bp = call->request; 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()
1981 afs_make_op_call(op, call, GFP_NOFS); in afs_fs_inline_bulk_status()
1987 static int afs_deliver_fs_fetch_acl(struct afs_call *call) in afs_deliver_fs_fetch_acl() argument
1989 struct afs_operation *op = call->op; in afs_deliver_fs_fetch_acl()
1996 _enter("{%u}", call->unmarshall); in afs_deliver_fs_fetch_acl()
1998 switch (call->unmarshall) { in afs_deliver_fs_fetch_acl()
2000 afs_extract_to_tmp(call); in afs_deliver_fs_fetch_acl()
2001 call->unmarshall++; in afs_deliver_fs_fetch_acl()
2006 ret = afs_extract_data(call, true); in afs_deliver_fs_fetch_acl()
2010 size = call->count2 = ntohl(call->tmp); 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()
2024 ret = afs_extract_data(call, true); in afs_deliver_fs_fetch_acl()
2028 afs_extract_to_buf(call, (21 + 6) * 4); in afs_deliver_fs_fetch_acl()
2029 call->unmarshall++; in afs_deliver_fs_fetch_acl()
2034 ret = afs_extract_data(call, false); 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()
2042 call->unmarshall++; in afs_deliver_fs_fetch_acl()
2068 struct afs_call *call; in afs_fs_fetch_acl() local
2074 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchACL, 16, (21 + 6) * 4); in afs_fs_fetch_acl()
2075 if (!call) in afs_fs_fetch_acl()
2079 bp = call->request; 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()
2087 afs_make_op_call(op, call, GFP_KERNEL); in afs_fs_fetch_acl()
2106 struct afs_call *call; in afs_fs_store_acl() local
2115 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreACL, in afs_fs_store_acl()
2117 if (!call) in afs_fs_store_acl()
2121 bp = call->request; 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()
2133 afs_make_op_call(op, call, GFP_KERNEL); in afs_fs_store_acl()