Lines Matching refs:call
55 struct afs_call *call,
60 bool inline_error = (call->operation_ID == afs_FS_InlineBulkStatus);
128 afs_protocol_error(call, afs_eproto_bad_status);
132 static time64_t xdr_decode_expiry(struct afs_call *call, u32 expiry)
134 return ktime_divns(call->issue_time, NSEC_PER_SEC) + expiry;
138 struct afs_call *call,
145 cb->expires_at = xdr_decode_expiry(call, ntohl(*bp++));
238 static int afs_deliver_fs_fetch_status(struct afs_call *call)
240 struct afs_operation *op = call->op;
245 ret = afs_transfer_reply(call);
250 bp = call->buffer;
251 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb);
252 xdr_decode_AFSCallBack(&bp, call, &vp->scb);
275 struct afs_call *call;
281 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchStatus,
283 if (!call)
287 bp = call->request;
293 trace_afs_make_fs_call(call, &vp->fid);
294 afs_make_op_call(op, call, GFP_NOFS);
300 static int afs_deliver_fs_fetch_data(struct afs_call *call)
302 struct afs_operation *op = call->op;
309 call->unmarshall, call->iov_len, iov_iter_count(call->iter),
312 switch (call->unmarshall) {
315 call->unmarshall++;
316 if (call->operation_ID == FSFETCHDATA64) {
317 afs_extract_to_tmp64(call);
319 call->tmp_u = htonl(0);
320 afs_extract_to_tmp(call);
330 ret = afs_extract_data(call, true);
334 req->actual_len = be64_to_cpu(call->tmp64);
340 call->iter = req->iter;
341 call->iov_len = min(req->actual_len, req->len);
342 call->unmarshall++;
348 iov_iter_count(call->iter), req->actual_len);
350 ret = afs_extract_data(call, true);
354 call->iter = &call->def_iter;
359 afs_extract_discard(call, req->actual_len - req->len);
360 call->unmarshall = 3;
365 iov_iter_count(call->iter), req->actual_len - req->len);
367 ret = afs_extract_data(call, true);
372 call->unmarshall = 4;
373 afs_extract_to_buf(call, (21 + 3 + 6) * 4);
378 ret = afs_extract_data(call, false);
382 bp = call->buffer;
383 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb);
384 xdr_decode_AFSCallBack(&bp, call, &vp->scb);
390 call->unmarshall++;
425 struct afs_call *call;
430 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchData64, 32, (21 + 3 + 6) * 4);
431 if (!call)
435 bp = call->request;
445 trace_afs_make_fs_call(call, &vp->fid);
446 afs_make_op_call(op, call, GFP_NOFS);
455 struct afs_call *call;
464 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchData, 24, (21 + 3 + 6) * 4);
465 if (!call)
468 req->call_debug_id = call->debug_id;
471 bp = call->request;
479 trace_afs_make_fs_call(call, &vp->fid);
480 afs_make_op_call(op, call, GFP_NOFS);
486 static int afs_deliver_fs_create_vnode(struct afs_call *call)
488 struct afs_operation *op = call->op;
494 ret = afs_transfer_reply(call);
499 bp = call->buffer;
501 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb);
502 xdr_decode_AFSFetchStatus(&bp, call, &dvp->scb);
503 xdr_decode_AFSCallBack(&bp, call, &vp->scb);
527 struct afs_call *call;
537 call = afs_alloc_flat_call(op->net, &afs_RXFSCreateFile,
539 if (!call)
543 bp = call->request;
562 trace_afs_make_fs_call1(call, &dvp->fid, name);
563 afs_make_op_call(op, call, GFP_NOFS);
580 struct afs_call *call;
590 call = afs_alloc_flat_call(op->net, &afs_RXFSMakeDir,
592 if (!call)
596 bp = call->request;
615 trace_afs_make_fs_call1(call, &dvp->fid, name);
616 afs_make_op_call(op, call, GFP_NOFS);
622 static int afs_deliver_fs_file_status_and_vol(struct afs_call *call)
624 struct afs_operation *op = call->op;
629 ret = afs_transfer_reply(call);
634 bp = call->buffer;
635 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb);
659 struct afs_call *call;
669 call = afs_alloc_flat_call(op->net, &afs_RXFSRemoveFile,
671 if (!call)
675 bp = call->request;
688 trace_afs_make_fs_call1(call, &dvp->fid, name);
689 afs_make_op_call(op, call, GFP_NOFS);
706 struct afs_call *call;
716 call = afs_alloc_flat_call(op->net, &afs_RXFSRemoveDir,
718 if (!call)
722 bp = call->request;
735 trace_afs_make_fs_call1(call, &dvp->fid, name);
736 afs_make_op_call(op, call, GFP_NOFS);
742 static int afs_deliver_fs_link(struct afs_call *call)
744 struct afs_operation *op = call->op;
750 _enter("{%u}", call->unmarshall);
752 ret = afs_transfer_reply(call);
757 bp = call->buffer;
758 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb);
759 xdr_decode_AFSFetchStatus(&bp, call, &dvp->scb);
784 struct afs_call *call;
794 call = afs_alloc_flat_call(op->net, &afs_RXFSLink, reqsz, (21 + 21 + 6) * 4);
795 if (!call)
799 bp = call->request;
815 trace_afs_make_fs_call1(call, &vp->fid, name);
816 afs_make_op_call(op, call, GFP_NOFS);
822 static int afs_deliver_fs_symlink(struct afs_call *call)
824 struct afs_operation *op = call->op;
830 _enter("{%u}", call->unmarshall);
832 ret = afs_transfer_reply(call);
837 bp = call->buffer;
839 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb);
840 xdr_decode_AFSFetchStatus(&bp, call, &dvp->scb);
864 struct afs_call *call;
878 call = afs_alloc_flat_call(op->net, &afs_RXFSSymlink, reqsz,
880 if (!call)
884 bp = call->request;
910 trace_afs_make_fs_call1(call, &dvp->fid, name);
911 afs_make_op_call(op, call, GFP_NOFS);
917 static int afs_deliver_fs_rename(struct afs_call *call)
919 struct afs_operation *op = call->op;
925 ret = afs_transfer_reply(call);
929 bp = call->buffer;
933 xdr_decode_AFSFetchStatus(&bp, call, &orig_dvp->scb);
934 xdr_decode_AFSFetchStatus(&bp, call, &new_dvp->scb);
960 struct afs_call *call;
977 call = afs_alloc_flat_call(op->net, &afs_RXFSRename, reqsz, (21 + 21 + 6) * 4);
978 if (!call)
982 bp = call->request;
1006 trace_afs_make_fs_call2(call, &orig_dvp->fid, orig_name, new_name);
1007 afs_make_op_call(op, call, GFP_NOFS);
1013 static int afs_deliver_fs_store_data(struct afs_call *call)
1015 struct afs_operation *op = call->op;
1022 ret = afs_transfer_reply(call);
1027 bp = call->buffer;
1028 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb);
1058 struct afs_call *call;
1064 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData64,
1067 if (!call)
1070 call->write_iter = op->store.write_iter;
1073 bp = call->request;
1093 trace_afs_make_fs_call(call, &vp->fid);
1094 afs_make_op_call(op, call, GFP_NOFS);
1103 struct afs_call *call;
1117 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData,
1120 if (!call)
1123 call->write_iter = op->store.write_iter;
1126 bp = call->request;
1143 trace_afs_make_fs_call(call, &vp->fid);
1144 afs_make_op_call(op, call, GFP_NOFS);
1178 struct afs_call *call;
1187 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData64_as_Status,
1190 if (!call)
1194 bp = call->request;
1209 trace_afs_make_fs_call(call, &vp->fid);
1210 afs_make_op_call(op, call, GFP_NOFS);
1220 struct afs_call *call;
1231 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreData_as_Status,
1234 if (!call)
1238 bp = call->request;
1250 trace_afs_make_fs_call(call, &vp->fid);
1251 afs_make_op_call(op, call, GFP_NOFS);
1261 struct afs_call *call;
1271 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreStatus,
1274 if (!call)
1278 bp = call->request;
1286 trace_afs_make_fs_call(call, &vp->fid);
1287 afs_make_op_call(op, call, GFP_NOFS);
1293 static int afs_deliver_fs_get_volume_status(struct afs_call *call)
1295 struct afs_operation *op = call->op;
1301 _enter("{%u}", call->unmarshall);
1303 switch (call->unmarshall) {
1305 call->unmarshall++;
1306 afs_extract_to_buf(call, 12 * 4);
1312 ret = afs_extract_data(call, true);
1316 bp = call->buffer;
1318 call->unmarshall++;
1319 afs_extract_to_tmp(call);
1324 ret = afs_extract_data(call, true);
1328 call->count = ntohl(call->tmp);
1329 _debug("volname length: %u", call->count);
1330 if (call->count >= AFSNAMEMAX)
1331 return afs_protocol_error(call, afs_eproto_volname_len);
1332 size = (call->count + 3) & ~3; /* It's padded */
1333 afs_extract_to_buf(call, size);
1334 call->unmarshall++;
1340 ret = afs_extract_data(call, true);
1344 p = call->buffer;
1345 p[call->count] = 0;
1347 afs_extract_to_tmp(call);
1348 call->unmarshall++;
1353 ret = afs_extract_data(call, true);
1357 call->count = ntohl(call->tmp);
1358 _debug("offline msg length: %u", call->count);
1359 if (call->count >= AFSNAMEMAX)
1360 return afs_protocol_error(call, afs_eproto_offline_msg_len);
1361 size = (call->count + 3) & ~3; /* It's padded */
1362 afs_extract_to_buf(call, size);
1363 call->unmarshall++;
1369 ret = afs_extract_data(call, true);
1373 p = call->buffer;
1374 p[call->count] = 0;
1377 afs_extract_to_tmp(call);
1378 call->unmarshall++;
1383 ret = afs_extract_data(call, true);
1387 call->count = ntohl(call->tmp);
1388 _debug("motd length: %u", call->count);
1389 if (call->count >= AFSNAMEMAX)
1390 return afs_protocol_error(call, afs_eproto_motd_len);
1391 size = (call->count + 3) & ~3; /* It's padded */
1392 afs_extract_to_buf(call, size);
1393 call->unmarshall++;
1399 ret = afs_extract_data(call, false);
1403 p = call->buffer;
1404 p[call->count] = 0;
1407 call->unmarshall++;
1434 struct afs_call *call;
1439 call = afs_alloc_flat_call(op->net, &afs_RXFSGetVolumeStatus, 2 * 4,
1441 if (!call)
1445 bp = call->request;
1449 trace_afs_make_fs_call(call, &vp->fid);
1450 afs_make_op_call(op, call, GFP_NOFS);
1456 static int afs_deliver_fs_xxxx_lock(struct afs_call *call)
1458 struct afs_operation *op = call->op;
1462 _enter("{%u}", call->unmarshall);
1464 ret = afs_transfer_reply(call);
1469 bp = call->buffer;
1514 struct afs_call *call;
1519 call = afs_alloc_flat_call(op->net, &afs_RXFSSetLock, 5 * 4, 6 * 4);
1520 if (!call)
1524 bp = call->request;
1531 trace_afs_make_fs_calli(call, &vp->fid, op->lock.type);
1532 afs_make_op_call(op, call, GFP_NOFS);
1541 struct afs_call *call;
1546 call = afs_alloc_flat_call(op->net, &afs_RXFSExtendLock, 4 * 4, 6 * 4);
1547 if (!call)
1551 bp = call->request;
1557 trace_afs_make_fs_call(call, &vp->fid);
1558 afs_make_op_call(op, call, GFP_NOFS);
1567 struct afs_call *call;
1572 call = afs_alloc_flat_call(op->net, &afs_RXFSReleaseLock, 4 * 4, 6 * 4);
1573 if (!call)
1577 bp = call->request;
1583 trace_afs_make_fs_call(call, &vp->fid);
1584 afs_make_op_call(op, call, GFP_NOFS);
1590 static int afs_deliver_fs_give_up_all_callbacks(struct afs_call *call)
1592 return afs_transfer_reply(call);
1613 struct afs_call *call;
1618 call = afs_alloc_flat_call(net, &afs_RXFSGiveUpAllCallBacks, 1 * 4, 0);
1619 if (!call)
1622 call->key = key;
1625 bp = call->request;
1628 call->server = afs_use_server(server, afs_server_trace_give_up_cb);
1629 afs_make_call(ac, call, GFP_NOFS);
1630 return afs_wait_for_call_to_complete(call, ac);
1636 static int afs_deliver_fs_get_capabilities(struct afs_call *call)
1641 _enter("{%u,%zu}", call->unmarshall, iov_iter_count(call->iter));
1643 switch (call->unmarshall) {
1645 afs_extract_to_tmp(call);
1646 call->unmarshall++;
1651 ret = afs_extract_data(call, true);
1655 count = ntohl(call->tmp);
1656 call->count = count;
1657 call->count2 = count;
1659 call->unmarshall = 4;
1660 call->tmp = 0;
1664 /* Extract the first word of the capabilities to call->tmp */
1665 afs_extract_to_tmp(call);
1666 call->unmarshall++;
1670 ret = afs_extract_data(call, false);
1674 afs_extract_discard(call, (count - 1) * sizeof(__be32));
1675 call->unmarshall++;
1680 ret = afs_extract_data(call, false);
1684 call->unmarshall++;
1706 * to allocate a call, true is returned the result is delivered through the
1712 struct afs_call *call;
1717 call = afs_alloc_flat_call(net, &afs_RXFSGetCapabilities, 1 * 4, 16 * 4);
1718 if (!call)
1721 call->key = key;
1722 call->server = afs_use_server(server, afs_server_trace_get_caps);
1723 call->upgrade = true;
1724 call->async = true;
1725 call->max_lifespan = AFS_PROBE_MAX_LIFESPAN;
1728 bp = call->request;
1731 trace_afs_make_fs_call(call, NULL);
1732 afs_make_call(ac, call, GFP_NOFS);
1733 afs_put_call(call);
1738 * Deliver reply data to an FS.InlineBulkStatus call
1740 static int afs_deliver_fs_inline_bulk_status(struct afs_call *call)
1742 struct afs_operation *op = call->op;
1748 _enter("{%u}", call->unmarshall);
1750 switch (call->unmarshall) {
1752 afs_extract_to_tmp(call);
1753 call->unmarshall++;
1759 ret = afs_extract_data(call, true);
1763 tmp = ntohl(call->tmp);
1766 return afs_protocol_error(call, afs_eproto_ibulkst_count);
1768 call->count = 0;
1769 call->unmarshall++;
1771 afs_extract_to_buf(call, 21 * sizeof(__be32));
1775 _debug("extract status array %u", call->count);
1776 ret = afs_extract_data(call, true);
1780 switch (call->count) {
1788 scb = &op->more_files[call->count - 2].scb;
1792 bp = call->buffer;
1793 xdr_decode_AFSFetchStatus(&bp, call, scb);
1795 call->count++;
1796 if (call->count < op->nr_files)
1799 call->count = 0;
1800 call->unmarshall++;
1801 afs_extract_to_tmp(call);
1807 ret = afs_extract_data(call, true);
1811 tmp = ntohl(call->tmp);
1814 return afs_protocol_error(call, afs_eproto_ibulkst_cb_count);
1815 call->count = 0;
1816 call->unmarshall++;
1818 afs_extract_to_buf(call, 3 * sizeof(__be32));
1823 ret = afs_extract_data(call, true);
1828 switch (call->count) {
1836 scb = &op->more_files[call->count - 2].scb;
1840 bp = call->buffer;
1841 xdr_decode_AFSCallBack(&bp, call, scb);
1842 call->count++;
1843 if (call->count < op->nr_files)
1846 afs_extract_to_buf(call, 6 * sizeof(__be32));
1847 call->unmarshall++;
1851 ret = afs_extract_data(call, false);
1855 bp = call->buffer;
1858 call->unmarshall++;
1869 static void afs_done_fs_inline_bulk_status(struct afs_call *call)
1871 if (call->error == -ECONNABORTED &&
1872 call->abort_code == RX_INVALID_OPERATION) {
1873 set_bit(AFS_SERVER_FL_NO_IBULK, &call->server->flags);
1874 if (call->op)
1875 set_bit(AFS_VOLUME_MAYBE_NO_IBULK, &call->op->volume->flags);
1897 struct afs_call *call;
1909 call = afs_alloc_flat_call(op->net, &afs_RXFSInlineBulkStatus,
1912 if (!call)
1916 bp = call->request;
1931 trace_afs_make_fs_call(call, &vp->fid);
1932 afs_make_op_call(op, call, GFP_NOFS);
1938 static int afs_deliver_fs_fetch_acl(struct afs_call *call)
1940 struct afs_operation *op = call->op;
1947 _enter("{%u}", call->unmarshall);
1949 switch (call->unmarshall) {
1951 afs_extract_to_tmp(call);
1952 call->unmarshall++;
1957 ret = afs_extract_data(call, true);
1961 size = call->count2 = ntohl(call->tmp);
1968 acl->size = call->count2;
1969 afs_extract_begin(call, acl->data, size);
1970 call->unmarshall++;
1975 ret = afs_extract_data(call, true);
1979 afs_extract_to_buf(call, (21 + 6) * 4);
1980 call->unmarshall++;
1985 ret = afs_extract_data(call, false);
1989 bp = call->buffer;
1990 xdr_decode_AFSFetchStatus(&bp, call, &vp->scb);
1993 call->unmarshall++;
2019 struct afs_call *call;
2025 call = afs_alloc_flat_call(op->net, &afs_RXFSFetchACL, 16, (21 + 6) * 4);
2026 if (!call)
2030 bp = call->request;
2036 trace_afs_make_fs_call(call, &vp->fid);
2037 afs_make_op_call(op, call, GFP_KERNEL);
2056 struct afs_call *call;
2065 call = afs_alloc_flat_call(op->net, &afs_RXFSStoreACL,
2067 if (!call)
2071 bp = call->request;
2081 trace_afs_make_fs_call(call, &vp->fid);
2082 afs_make_op_call(op, call, GFP_KERNEL);