Lines Matching defs:credits

491 	int *credits;
505 credits = server->ops->get_credits_field(server, optype);
507 if (*credits <= 0 && optype == CIFS_ECHO_OP)
516 *credits -= 1;
518 scredits = *credits;
524 cifs_dbg(FYI, "%s: remove %u credits total=%d\n",
541 if (*credits < num_credits) {
542 scredits = *credits;
547 has_credits(server, credits, num_credits), t);
551 scredits = *credits;
568 * credits to compound requests.
570 * starved for credits by single-credit requests.
573 * there are >MAX_COMPOUND credits available.
575 * credits in flight to avoid triggering this check
576 * for servers that are slow to hand out credits on
581 *credits <= MAX_COMPOUND) {
587 has_credits(server, credits,
593 scredits = *credits;
618 *credits -= num_credits;
624 scredits = *credits;
631 cifs_dbg(FYI, "%s: remove %u credits total=%d\n",
651 int *credits;
654 credits = server->ops->get_credits_field(server, flags & CIFS_OP_MASK);
657 scredits = *credits;
660 if (*credits < num) {
663 * credits for other reasons (e.g. requests are coming out of
664 * order and the server delays granting more credits until it
666 * credits there may be situations when we try to send
667 * a compound request but we don't have enough credits. At this
669 * additional credits or fail the request. If at least one
671 * server will return enough credits to satisfy this compound
675 * stuck on waiting for credits.
695 size_t *num, struct cifs_credits *credits)
698 credits->value = 0;
699 credits->instance = server->reconnect_instance;
790 struct cifs_credits credits = { .value = 0, .instance = 0 };
800 credits.value = 1;
801 credits.instance = instance;
808 * We can't use credits obtained from the previous session to send this
809 * request. Check if there were reconnects after we obtained credits and
814 add_credits_and_wake_if(server, &credits, optype);
821 add_credits_and_wake_if(server, &credits, optype);
844 revert_current_mid(server, mid->credits);
854 add_credits_and_wake_if(server, &credits, optype);
991 struct cifs_credits credits;
993 credits.value = server->ops->get_credits(mid);
994 credits.instance = server->reconnect_instance;
996 add_credits(server, &credits, mid->optype);
1079 struct cifs_credits credits[MAX_COMPOUND] = {
1105 * credits if the server doesn't grant credits to the outstanding
1116 credits[i].value = 1;
1117 credits[i].instance = instance;
1129 * All the parts of the compound chain belong obtained credits from the
1130 * same session. We can not use credits obtained from the previous
1132 * we obtained credits and return -EAGAIN in such cases to let callers
1138 add_credits(server, &credits[j], optype);
1152 add_credits(server, &credits[j], optype);
1160 * to calculate credits properly. Wake up this thread only when
1182 * will not receive a response to - return credits back
1186 add_credits(server, &credits[i], optype);
1192 * that any credits taken from the server structure on the client have
1194 * we will collect credits granted by the server in the mid callbacks
1195 * and add those credits to the server structure.
1229 credits[i].value = 0;
1363 struct cifs_credits credits = { .value = 1, .instance = 0 };
1393 rc = wait_for_free_request(server, flags, &credits.instance);
1407 add_credits(server, &credits, 0);
1439 add_credits(server, &credits, 0);
1447 add_credits(server, &credits, 0);
1463 add_credits(server, &credits, 0);
1739 /* set up first two iov for signature check and to get credits */