Lines Matching refs:call
17 static int afs_deliver_vl_get_entry_by_name_u(struct afs_call *call) in afs_deliver_vl_get_entry_by_name_u() argument
27 ret = afs_transfer_reply(call); in afs_deliver_vl_get_entry_by_name_u()
32 uvldb = call->buffer; in afs_deliver_vl_get_entry_by_name_u()
33 entry = call->ret_vldb; in afs_deliver_vl_get_entry_by_name_u()
109 static void afs_destroy_vl_get_entry_by_name_u(struct afs_call *call) in afs_destroy_vl_get_entry_by_name_u() argument
111 kfree(call->ret_vldb); in afs_destroy_vl_get_entry_by_name_u()
112 afs_flat_call_destructor(call); in afs_destroy_vl_get_entry_by_name_u()
134 struct afs_call *call; in afs_vl_get_entry_by_name_u() local
148 call = afs_alloc_flat_call(net, &afs_RXVLGetEntryByNameU, reqsz, in afs_vl_get_entry_by_name_u()
150 if (!call) { in afs_vl_get_entry_by_name_u()
155 call->key = vc->key; in afs_vl_get_entry_by_name_u()
156 call->ret_vldb = entry; in afs_vl_get_entry_by_name_u()
157 call->max_lifespan = AFS_VL_MAX_LIFESPAN; in afs_vl_get_entry_by_name_u()
160 bp = call->request; in afs_vl_get_entry_by_name_u()
167 trace_afs_make_vl_call(call); in afs_vl_get_entry_by_name_u()
168 afs_make_call(&vc->ac, call, GFP_KERNEL); in afs_vl_get_entry_by_name_u()
169 return (struct afs_vldb_entry *)afs_wait_for_call_to_complete(call, &vc->ac); in afs_vl_get_entry_by_name_u()
181 static int afs_deliver_vl_get_addrs_u(struct afs_call *call) in afs_deliver_vl_get_addrs_u() argument
189 call->unmarshall, iov_iter_count(call->iter), call->count); in afs_deliver_vl_get_addrs_u()
191 switch (call->unmarshall) { in afs_deliver_vl_get_addrs_u()
193 afs_extract_to_buf(call, in afs_deliver_vl_get_addrs_u()
195 call->unmarshall++; in afs_deliver_vl_get_addrs_u()
201 ret = afs_extract_data(call, true); in afs_deliver_vl_get_addrs_u()
205 bp = call->buffer + sizeof(struct afs_uuid__xdr); in afs_deliver_vl_get_addrs_u()
215 call->ret_alist = alist; in afs_deliver_vl_get_addrs_u()
216 call->count = count; in afs_deliver_vl_get_addrs_u()
217 call->count2 = nentries; in afs_deliver_vl_get_addrs_u()
218 call->unmarshall++; in afs_deliver_vl_get_addrs_u()
221 count = min(call->count, 4U); in afs_deliver_vl_get_addrs_u()
222 afs_extract_to_buf(call, count * sizeof(__be32)); in afs_deliver_vl_get_addrs_u()
226 ret = afs_extract_data(call, call->count > 4); in afs_deliver_vl_get_addrs_u()
230 alist = call->ret_alist; in afs_deliver_vl_get_addrs_u()
231 bp = call->buffer; in afs_deliver_vl_get_addrs_u()
232 count = min(call->count, 4U); in afs_deliver_vl_get_addrs_u()
234 if (alist->nr_addrs < call->count2) in afs_deliver_vl_get_addrs_u()
237 call->count -= count; in afs_deliver_vl_get_addrs_u()
238 if (call->count > 0) in afs_deliver_vl_get_addrs_u()
240 call->unmarshall++; in afs_deliver_vl_get_addrs_u()
248 static void afs_vl_get_addrs_u_destructor(struct afs_call *call) in afs_vl_get_addrs_u_destructor() argument
250 afs_put_addrlist(call->ret_alist); in afs_vl_get_addrs_u_destructor()
251 return afs_flat_call_destructor(call); in afs_vl_get_addrs_u_destructor()
273 struct afs_call *call; in afs_vl_get_addrs_u() local
280 call = afs_alloc_flat_call(net, &afs_RXVLGetAddrsU, in afs_vl_get_addrs_u()
283 if (!call) in afs_vl_get_addrs_u()
286 call->key = vc->key; in afs_vl_get_addrs_u()
287 call->ret_alist = NULL; in afs_vl_get_addrs_u()
288 call->max_lifespan = AFS_VL_MAX_LIFESPAN; in afs_vl_get_addrs_u()
291 bp = call->request; in afs_vl_get_addrs_u()
306 trace_afs_make_vl_call(call); in afs_vl_get_addrs_u()
307 afs_make_call(&vc->ac, call, GFP_KERNEL); in afs_vl_get_addrs_u()
308 return (struct afs_addr_list *)afs_wait_for_call_to_complete(call, &vc->ac); in afs_vl_get_addrs_u()
314 static int afs_deliver_vl_get_capabilities(struct afs_call *call) in afs_deliver_vl_get_capabilities() argument
320 call->unmarshall, iov_iter_count(call->iter), call->count); in afs_deliver_vl_get_capabilities()
322 switch (call->unmarshall) { in afs_deliver_vl_get_capabilities()
324 afs_extract_to_tmp(call); in afs_deliver_vl_get_capabilities()
325 call->unmarshall++; in afs_deliver_vl_get_capabilities()
329 ret = afs_extract_data(call, true); in afs_deliver_vl_get_capabilities()
333 count = ntohl(call->tmp); in afs_deliver_vl_get_capabilities()
334 call->count = count; in afs_deliver_vl_get_capabilities()
335 call->count2 = count; in afs_deliver_vl_get_capabilities()
337 call->unmarshall++; in afs_deliver_vl_get_capabilities()
338 afs_extract_discard(call, count * sizeof(__be32)); in afs_deliver_vl_get_capabilities()
342 ret = afs_extract_data(call, false); in afs_deliver_vl_get_capabilities()
348 call->unmarshall++; in afs_deliver_vl_get_capabilities()
356 static void afs_destroy_vl_get_capabilities(struct afs_call *call) in afs_destroy_vl_get_capabilities() argument
358 afs_put_vlserver(call->net, call->vlserver); in afs_destroy_vl_get_capabilities()
359 afs_flat_call_destructor(call); in afs_destroy_vl_get_capabilities()
386 struct afs_call *call; in afs_vl_get_capabilities() local
391 call = afs_alloc_flat_call(net, &afs_RXVLGetCapabilities, 1 * 4, 16 * 4); in afs_vl_get_capabilities()
392 if (!call) in afs_vl_get_capabilities()
395 call->key = key; in afs_vl_get_capabilities()
396 call->vlserver = afs_get_vlserver(server); in afs_vl_get_capabilities()
397 call->server_index = server_index; in afs_vl_get_capabilities()
398 call->upgrade = true; in afs_vl_get_capabilities()
399 call->async = true; in afs_vl_get_capabilities()
400 call->max_lifespan = AFS_PROBE_MAX_LIFESPAN; in afs_vl_get_capabilities()
403 bp = call->request; in afs_vl_get_capabilities()
407 trace_afs_make_vl_call(call); in afs_vl_get_capabilities()
408 afs_make_call(ac, call, GFP_KERNEL); in afs_vl_get_capabilities()
409 return call; in afs_vl_get_capabilities()
421 static int afs_deliver_yfsvl_get_endpoints(struct afs_call *call) in afs_deliver_yfsvl_get_endpoints() argument
429 call->unmarshall, iov_iter_count(call->iter), call->count2); in afs_deliver_yfsvl_get_endpoints()
431 switch (call->unmarshall) { in afs_deliver_yfsvl_get_endpoints()
433 afs_extract_to_buf(call, sizeof(uuid_t) + 3 * sizeof(__be32)); in afs_deliver_yfsvl_get_endpoints()
434 call->unmarshall = 1; in afs_deliver_yfsvl_get_endpoints()
441 ret = afs_extract_data(call, true); in afs_deliver_yfsvl_get_endpoints()
445 bp = call->buffer + sizeof(uuid_t); in afs_deliver_yfsvl_get_endpoints()
447 call->count = ntohl(*bp++); in afs_deliver_yfsvl_get_endpoints()
448 call->count2 = ntohl(*bp); /* Type or next count */ in afs_deliver_yfsvl_get_endpoints()
450 if (call->count > YFS_MAXENDPOINTS) in afs_deliver_yfsvl_get_endpoints()
451 return afs_protocol_error(call, afs_eproto_yvl_fsendpt_num); in afs_deliver_yfsvl_get_endpoints()
453 alist = afs_alloc_addrlist(call->count, FS_SERVICE, AFS_FS_PORT); in afs_deliver_yfsvl_get_endpoints()
457 call->ret_alist = alist; in afs_deliver_yfsvl_get_endpoints()
459 if (call->count == 0) in afs_deliver_yfsvl_get_endpoints()
463 switch (call->count2) { in afs_deliver_yfsvl_get_endpoints()
471 return afs_protocol_error(call, afs_eproto_yvl_fsendpt_type); in afs_deliver_yfsvl_get_endpoints()
475 afs_extract_to_buf(call, size); in afs_deliver_yfsvl_get_endpoints()
476 call->unmarshall = 2; in afs_deliver_yfsvl_get_endpoints()
480 ret = afs_extract_data(call, true); in afs_deliver_yfsvl_get_endpoints()
484 alist = call->ret_alist; in afs_deliver_yfsvl_get_endpoints()
485 bp = call->buffer; in afs_deliver_yfsvl_get_endpoints()
486 switch (call->count2) { in afs_deliver_yfsvl_get_endpoints()
490 call, afs_eproto_yvl_fsendpt4_len); in afs_deliver_yfsvl_get_endpoints()
497 call, afs_eproto_yvl_fsendpt6_len); in afs_deliver_yfsvl_get_endpoints()
502 return afs_protocol_error(call, afs_eproto_yvl_fsendpt_type); in afs_deliver_yfsvl_get_endpoints()
508 call->count2 = ntohl(*bp++); in afs_deliver_yfsvl_get_endpoints()
510 call->count--; in afs_deliver_yfsvl_get_endpoints()
511 if (call->count > 0) in afs_deliver_yfsvl_get_endpoints()
516 call->count = call->count2; in afs_deliver_yfsvl_get_endpoints()
517 if (!call->count) in afs_deliver_yfsvl_get_endpoints()
519 if (call->count > YFS_MAXENDPOINTS) in afs_deliver_yfsvl_get_endpoints()
520 return afs_protocol_error(call, afs_eproto_yvl_vlendpt_type); in afs_deliver_yfsvl_get_endpoints()
522 afs_extract_to_buf(call, 1 * sizeof(__be32)); in afs_deliver_yfsvl_get_endpoints()
523 call->unmarshall = 3; in afs_deliver_yfsvl_get_endpoints()
531 ret = afs_extract_data(call, true); in afs_deliver_yfsvl_get_endpoints()
535 bp = call->buffer; in afs_deliver_yfsvl_get_endpoints()
538 call->count2 = ntohl(*bp++); in afs_deliver_yfsvl_get_endpoints()
539 switch (call->count2) { in afs_deliver_yfsvl_get_endpoints()
547 return afs_protocol_error(call, afs_eproto_yvl_vlendpt_type); in afs_deliver_yfsvl_get_endpoints()
550 if (call->count > 1) in afs_deliver_yfsvl_get_endpoints()
552 afs_extract_to_buf(call, size); in afs_deliver_yfsvl_get_endpoints()
553 call->unmarshall = 4; in afs_deliver_yfsvl_get_endpoints()
557 ret = afs_extract_data(call, true); in afs_deliver_yfsvl_get_endpoints()
561 bp = call->buffer; in afs_deliver_yfsvl_get_endpoints()
562 switch (call->count2) { in afs_deliver_yfsvl_get_endpoints()
566 call, afs_eproto_yvl_vlendpt4_len); in afs_deliver_yfsvl_get_endpoints()
572 call, afs_eproto_yvl_vlendpt6_len); in afs_deliver_yfsvl_get_endpoints()
576 return afs_protocol_error(call, afs_eproto_yvl_vlendpt_type); in afs_deliver_yfsvl_get_endpoints()
582 call->count--; in afs_deliver_yfsvl_get_endpoints()
583 if (call->count > 0) in afs_deliver_yfsvl_get_endpoints()
587 afs_extract_discard(call, 0); in afs_deliver_yfsvl_get_endpoints()
588 call->unmarshall = 5; in afs_deliver_yfsvl_get_endpoints()
592 ret = afs_extract_data(call, false); in afs_deliver_yfsvl_get_endpoints()
595 call->unmarshall = 6; in afs_deliver_yfsvl_get_endpoints()
623 struct afs_call *call; in afs_yfsvl_get_endpoints() local
629 call = afs_alloc_flat_call(net, &afs_YFSVLGetEndpoints, in afs_yfsvl_get_endpoints()
632 if (!call) in afs_yfsvl_get_endpoints()
635 call->key = vc->key; in afs_yfsvl_get_endpoints()
636 call->ret_alist = NULL; in afs_yfsvl_get_endpoints()
637 call->max_lifespan = AFS_VL_MAX_LIFESPAN; in afs_yfsvl_get_endpoints()
640 bp = call->request; in afs_yfsvl_get_endpoints()
645 trace_afs_make_vl_call(call); in afs_yfsvl_get_endpoints()
646 afs_make_call(&vc->ac, call, GFP_KERNEL); in afs_yfsvl_get_endpoints()
647 return (struct afs_addr_list *)afs_wait_for_call_to_complete(call, &vc->ac); in afs_yfsvl_get_endpoints()
653 static int afs_deliver_yfsvl_get_cell_name(struct afs_call *call) in afs_deliver_yfsvl_get_cell_name() argument
660 call->unmarshall, iov_iter_count(call->iter), call->count); in afs_deliver_yfsvl_get_cell_name()
662 switch (call->unmarshall) { in afs_deliver_yfsvl_get_cell_name()
664 afs_extract_to_tmp(call); in afs_deliver_yfsvl_get_cell_name()
665 call->unmarshall++; in afs_deliver_yfsvl_get_cell_name()
669 ret = afs_extract_data(call, true); in afs_deliver_yfsvl_get_cell_name()
673 namesz = ntohl(call->tmp); in afs_deliver_yfsvl_get_cell_name()
675 return afs_protocol_error(call, afs_eproto_cellname_len); in afs_deliver_yfsvl_get_cell_name()
677 call->count = namesz; in afs_deliver_yfsvl_get_cell_name()
678 call->count2 = paddedsz - namesz; in afs_deliver_yfsvl_get_cell_name()
684 call->ret_str = cell_name; in afs_deliver_yfsvl_get_cell_name()
686 afs_extract_begin(call, cell_name, namesz); in afs_deliver_yfsvl_get_cell_name()
687 call->unmarshall++; in afs_deliver_yfsvl_get_cell_name()
691 ret = afs_extract_data(call, true); in afs_deliver_yfsvl_get_cell_name()
695 afs_extract_discard(call, call->count2); in afs_deliver_yfsvl_get_cell_name()
696 call->unmarshall++; in afs_deliver_yfsvl_get_cell_name()
700 ret = afs_extract_data(call, false); in afs_deliver_yfsvl_get_cell_name()
704 call->unmarshall++; in afs_deliver_yfsvl_get_cell_name()
712 static void afs_destroy_yfsvl_get_cell_name(struct afs_call *call) in afs_destroy_yfsvl_get_cell_name() argument
714 kfree(call->ret_str); in afs_destroy_yfsvl_get_cell_name()
715 afs_flat_call_destructor(call); in afs_destroy_yfsvl_get_cell_name()
737 struct afs_call *call; in afs_yfsvl_get_cell_name() local
743 call = afs_alloc_flat_call(net, &afs_YFSVLGetCellName, 1 * 4, 0); in afs_yfsvl_get_cell_name()
744 if (!call) in afs_yfsvl_get_cell_name()
747 call->key = vc->key; in afs_yfsvl_get_cell_name()
748 call->ret_str = NULL; in afs_yfsvl_get_cell_name()
749 call->max_lifespan = AFS_VL_MAX_LIFESPAN; in afs_yfsvl_get_cell_name()
752 bp = call->request; in afs_yfsvl_get_cell_name()
756 trace_afs_make_vl_call(call); in afs_yfsvl_get_cell_name()
757 afs_make_call(&vc->ac, call, GFP_KERNEL); in afs_yfsvl_get_cell_name()
758 return (char *)afs_wait_for_call_to_complete(call, &vc->ac); in afs_yfsvl_get_cell_name()