Lines Matching full:credits
495 int *credits; in wait_for_free_credits() local
509 credits = server->ops->get_credits_field(server, optype); in wait_for_free_credits()
511 if (*credits <= 0 && optype == CIFS_ECHO_OP) in wait_for_free_credits()
520 *credits -= 1; in wait_for_free_credits()
522 scredits = *credits; in wait_for_free_credits()
528 cifs_dbg(FYI, "%s: remove %u credits total=%d\n", in wait_for_free_credits()
545 if (*credits < num_credits) { in wait_for_free_credits()
546 scredits = *credits; in wait_for_free_credits()
551 has_credits(server, credits, num_credits), t); in wait_for_free_credits()
555 scredits = *credits; in wait_for_free_credits()
572 * credits to compound requests. in wait_for_free_credits()
574 * starved for credits by single-credit requests. in wait_for_free_credits()
577 * there are >MAX_COMPOUND credits available. in wait_for_free_credits()
579 * credits in flight to avoid triggering this check in wait_for_free_credits()
580 * for servers that are slow to hand out credits on in wait_for_free_credits()
585 *credits <= MAX_COMPOUND) { in wait_for_free_credits()
591 has_credits(server, credits, in wait_for_free_credits()
597 scredits = *credits; in wait_for_free_credits()
622 *credits -= num_credits; in wait_for_free_credits()
628 scredits = *credits; in wait_for_free_credits()
635 cifs_dbg(FYI, "%s: remove %u credits total=%d\n", in wait_for_free_credits()
655 int *credits; in wait_for_compound_request() local
658 credits = server->ops->get_credits_field(server, flags & CIFS_OP_MASK); in wait_for_compound_request()
661 scredits = *credits; in wait_for_compound_request()
664 if (*credits < num) { in wait_for_compound_request()
667 * credits for other reasons (e.g. requests are coming out of in wait_for_compound_request()
668 * order and the server delays granting more credits until it in wait_for_compound_request()
670 * credits there may be situations when we try to send in wait_for_compound_request()
671 * a compound request but we don't have enough credits. At this in wait_for_compound_request()
673 * additional credits or fail the request. If at least one in wait_for_compound_request()
675 * server will return enough credits to satisfy this compound in wait_for_compound_request()
679 * stuck on waiting for credits. in wait_for_compound_request()
699 size_t *num, struct cifs_credits *credits) in cifs_wait_mtu_credits() argument
702 credits->value = 0; in cifs_wait_mtu_credits()
703 credits->instance = server->reconnect_instance; in cifs_wait_mtu_credits()
794 struct cifs_credits credits = { .value = 0, .instance = 0 }; in cifs_call_async() local
804 credits.value = 1; in cifs_call_async()
805 credits.instance = instance; in cifs_call_async()
812 * We can't use credits obtained from the previous session to send this in cifs_call_async()
813 * request. Check if there were reconnects after we obtained credits and in cifs_call_async()
818 add_credits_and_wake_if(server, &credits, optype); in cifs_call_async()
825 add_credits_and_wake_if(server, &credits, optype); in cifs_call_async()
848 revert_current_mid(server, mid->credits); in cifs_call_async()
858 add_credits_and_wake_if(server, &credits, optype); in cifs_call_async()
995 struct cifs_credits credits = { in cifs_compound_callback() local
1000 add_credits(server, &credits, mid->optype); in cifs_compound_callback()
1083 struct cifs_credits credits[MAX_COMPOUND] = { in compound_send_recv() local
1109 * credits if the server doesn't grant credits to the outstanding in compound_send_recv()
1120 credits[i].value = 1; in compound_send_recv()
1121 credits[i].instance = instance; in compound_send_recv()
1133 * All the parts of the compound chain belong obtained credits from the in compound_send_recv()
1134 * same session. We can not use credits obtained from the previous in compound_send_recv()
1136 * we obtained credits and return -EAGAIN in such cases to let callers in compound_send_recv()
1142 add_credits(server, &credits[j], optype); in compound_send_recv()
1156 add_credits(server, &credits[j], optype); in compound_send_recv()
1164 * to calculate credits properly. Wake up this thread only when in compound_send_recv()
1186 * will not receive a response to - return credits back in compound_send_recv()
1190 add_credits(server, &credits[i], optype); in compound_send_recv()
1196 * that any credits taken from the server structure on the client have in compound_send_recv()
1198 * we will collect credits granted by the server in the mid callbacks in compound_send_recv()
1199 * and add those credits to the server structure. in compound_send_recv()
1233 credits[i].value = 0; in compound_send_recv()
1367 struct cifs_credits credits = { .value = 1, .instance = 0 }; in SendReceive() local
1397 rc = wait_for_free_request(server, flags, &credits.instance); in SendReceive()
1411 add_credits(server, &credits, 0); in SendReceive()
1443 add_credits(server, &credits, 0); in SendReceive()
1451 add_credits(server, &credits, 0); in SendReceive()
1467 add_credits(server, &credits, 0); in SendReceive()
1743 /* set up first two iov for signature check and to get credits */ in cifs_readv_receive()