Lines Matching full:credits
432 int *credits; in wait_for_free_credits() local
446 credits = server->ops->get_credits_field(server, optype); in wait_for_free_credits()
448 if (*credits <= 0 && optype == CIFS_ECHO_OP) in wait_for_free_credits()
457 *credits -= 1; in wait_for_free_credits()
459 scredits = *credits; in wait_for_free_credits()
465 cifs_dbg(FYI, "%s: remove %u credits total=%d\n", in wait_for_free_credits()
482 if (*credits < num_credits) { in wait_for_free_credits()
483 scredits = *credits; in wait_for_free_credits()
488 has_credits(server, credits, num_credits), t); in wait_for_free_credits()
492 scredits = *credits; in wait_for_free_credits()
509 * credits to compound requests. in wait_for_free_credits()
511 * starved for credits by single-credit requests. in wait_for_free_credits()
514 * there are >MAX_COMPOUND credits available. in wait_for_free_credits()
516 * credits in flight to avoid triggering this check in wait_for_free_credits()
517 * for servers that are slow to hand out credits on in wait_for_free_credits()
522 *credits <= MAX_COMPOUND) { in wait_for_free_credits()
528 has_credits(server, credits, in wait_for_free_credits()
534 scredits = *credits; in wait_for_free_credits()
559 *credits -= num_credits; in wait_for_free_credits()
565 scredits = *credits; in wait_for_free_credits()
572 cifs_dbg(FYI, "%s: remove %u credits total=%d\n", in wait_for_free_credits()
591 int *credits; in wait_for_compound_request() local
594 credits = server->ops->get_credits_field(server, flags & CIFS_OP_MASK); in wait_for_compound_request()
597 scredits = *credits; in wait_for_compound_request()
600 if (*credits < num) { in wait_for_compound_request()
603 * credits for other reasons (e.g. requests are coming out of in wait_for_compound_request()
604 * order and the server delays granting more credits until it in wait_for_compound_request()
606 * credits there may be situations when we try to send in wait_for_compound_request()
607 * a compound request but we don't have enough credits. At this in wait_for_compound_request()
609 * additional credits or fail the request. If at least one in wait_for_compound_request()
611 * server will return enough credits to satisfy this compound in wait_for_compound_request()
615 * stuck on waiting for credits. in wait_for_compound_request()
635 size_t *num, struct cifs_credits *credits) in cifs_wait_mtu_credits() argument
638 credits->value = 0; in cifs_wait_mtu_credits()
639 credits->instance = server->reconnect_instance; in cifs_wait_mtu_credits()
669 struct cifs_credits credits = { .value = 0, .instance = 0 }; in cifs_call_async() local
679 credits.value = 1; in cifs_call_async()
680 credits.instance = instance; in cifs_call_async()
687 * We can't use credits obtained from the previous session to send this in cifs_call_async()
688 * request. Check if there were reconnects after we obtained credits and in cifs_call_async()
693 add_credits_and_wake_if(server, &credits, optype); in cifs_call_async()
700 add_credits_and_wake_if(server, &credits, optype); in cifs_call_async()
723 revert_current_mid(server, mid->credits); in cifs_call_async()
733 add_credits_and_wake_if(server, &credits, optype); in cifs_call_async()
783 struct cifs_credits credits = { in cifs_compound_callback() local
788 add_credits(server, &credits, mid->optype); in cifs_compound_callback()
871 struct cifs_credits credits[MAX_COMPOUND] = { in compound_send_recv() local
897 * credits if the server doesn't grant credits to the outstanding in compound_send_recv()
908 credits[i].value = 1; in compound_send_recv()
909 credits[i].instance = instance; in compound_send_recv()
921 * All the parts of the compound chain belong obtained credits from the in compound_send_recv()
922 * same session. We can not use credits obtained from the previous in compound_send_recv()
924 * we obtained credits and return -EAGAIN in such cases to let callers in compound_send_recv()
930 add_credits(server, &credits[j], optype); in compound_send_recv()
944 add_credits(server, &credits[j], optype); in compound_send_recv()
952 * to calculate credits properly. Wake up this thread only when in compound_send_recv()
974 * will not receive a response to - return credits back in compound_send_recv()
978 add_credits(server, &credits[i], optype); in compound_send_recv()
984 * that any credits taken from the server structure on the client have in compound_send_recv()
986 * we will collect credits granted by the server in the mid callbacks in compound_send_recv()
987 * and add those credits to the server structure. in compound_send_recv()
1020 credits[i].value = 0; in compound_send_recv()
1192 /* set up first two iov for signature check and to get credits */ in cifs_readv_receive()