Lines Matching full:credits
481 int *credits; in wait_for_free_credits() local
495 credits = server->ops->get_credits_field(server, optype); in wait_for_free_credits()
497 if (*credits <= 0 && optype == CIFS_ECHO_OP) in wait_for_free_credits()
506 *credits -= 1; in wait_for_free_credits()
508 scredits = *credits; in wait_for_free_credits()
514 cifs_dbg(FYI, "%s: remove %u credits total=%d\n", in wait_for_free_credits()
531 if (*credits < num_credits) { in wait_for_free_credits()
532 scredits = *credits; in wait_for_free_credits()
537 has_credits(server, credits, num_credits), t); in wait_for_free_credits()
541 scredits = *credits; in wait_for_free_credits()
558 * credits to compound requests. in wait_for_free_credits()
560 * starved for credits by single-credit requests. in wait_for_free_credits()
563 * there are >MAX_COMPOUND credits available. in wait_for_free_credits()
565 * credits in flight to avoid triggering this check in wait_for_free_credits()
566 * for servers that are slow to hand out credits on in wait_for_free_credits()
571 *credits <= MAX_COMPOUND) { in wait_for_free_credits()
577 has_credits(server, credits, in wait_for_free_credits()
583 scredits = *credits; in wait_for_free_credits()
608 *credits -= num_credits; in wait_for_free_credits()
614 scredits = *credits; in wait_for_free_credits()
621 cifs_dbg(FYI, "%s: remove %u credits total=%d\n", in wait_for_free_credits()
641 int *credits; in wait_for_compound_request() local
644 credits = server->ops->get_credits_field(server, flags & CIFS_OP_MASK); in wait_for_compound_request()
647 scredits = *credits; in wait_for_compound_request()
650 if (*credits < num) { in wait_for_compound_request()
653 * credits for other reasons (e.g. requests are coming out of in wait_for_compound_request()
654 * order and the server delays granting more credits until it in wait_for_compound_request()
656 * credits there may be situations when we try to send in wait_for_compound_request()
657 * a compound request but we don't have enough credits. At this in wait_for_compound_request()
659 * additional credits or fail the request. If at least one in wait_for_compound_request()
661 * server will return enough credits to satisfy this compound in wait_for_compound_request()
665 * stuck on waiting for credits. in wait_for_compound_request()
685 size_t *num, struct cifs_credits *credits) in cifs_wait_mtu_credits() argument
688 credits->value = 0; in cifs_wait_mtu_credits()
689 credits->instance = server->reconnect_instance; in cifs_wait_mtu_credits()
780 struct cifs_credits credits = { .value = 0, .instance = 0 }; in cifs_call_async() local
790 credits.value = 1; in cifs_call_async()
791 credits.instance = instance; in cifs_call_async()
798 * We can't use credits obtained from the previous session to send this in cifs_call_async()
799 * request. Check if there were reconnects after we obtained credits and in cifs_call_async()
804 add_credits_and_wake_if(server, &credits, optype); in cifs_call_async()
811 add_credits_and_wake_if(server, &credits, optype); in cifs_call_async()
834 revert_current_mid(server, mid->credits); in cifs_call_async()
844 add_credits_and_wake_if(server, &credits, optype); in cifs_call_async()
981 struct cifs_credits credits = { in cifs_compound_callback() local
986 add_credits(server, &credits, mid->optype); in cifs_compound_callback()
1069 struct cifs_credits credits[MAX_COMPOUND] = { in compound_send_recv() local
1095 * credits if the server doesn't grant credits to the outstanding in compound_send_recv()
1106 credits[i].value = 1; in compound_send_recv()
1107 credits[i].instance = instance; in compound_send_recv()
1119 * All the parts of the compound chain belong obtained credits from the in compound_send_recv()
1120 * same session. We can not use credits obtained from the previous in compound_send_recv()
1122 * we obtained credits and return -EAGAIN in such cases to let callers in compound_send_recv()
1128 add_credits(server, &credits[j], optype); in compound_send_recv()
1142 add_credits(server, &credits[j], optype); in compound_send_recv()
1150 * to calculate credits properly. Wake up this thread only when in compound_send_recv()
1172 * will not receive a response to - return credits back in compound_send_recv()
1176 add_credits(server, &credits[i], optype); in compound_send_recv()
1182 * that any credits taken from the server structure on the client have in compound_send_recv()
1184 * we will collect credits granted by the server in the mid callbacks in compound_send_recv()
1185 * and add those credits to the server structure. in compound_send_recv()
1219 credits[i].value = 0; in compound_send_recv()
1353 struct cifs_credits credits = { .value = 1, .instance = 0 }; in SendReceive() local
1383 rc = wait_for_free_request(server, flags, &credits.instance); in SendReceive()
1397 add_credits(server, &credits, 0); in SendReceive()
1429 add_credits(server, &credits, 0); in SendReceive()
1437 add_credits(server, &credits, 0); in SendReceive()
1453 add_credits(server, &credits, 0); in SendReceive()
1729 /* set up first two iov for signature check and to get credits */ in cifs_readv_receive()