Lines Matching refs:credits

528 	int *credits;
541 credits = server->ops->get_credits_field(server, optype);
543 if (*credits <= 0 && optype == CIFS_ECHO_OP)
552 *credits -= 1;
559 if (*credits < num_credits) {
563 has_credits(server, credits, num_credits), t);
583 * credits to compound requests.
585 * starved for credits by single-credit requests.
588 * there are >MAX_COMPOUND credits available.
590 * credits in flight to avoid triggering this check
591 * for servers that are slow to hand out credits on
596 *credits <= MAX_COMPOUND) {
601 has_credits(server, credits,
627 *credits -= num_credits;
652 int *credits;
654 credits = server->ops->get_credits_field(server, flags & CIFS_OP_MASK);
657 if (*credits < num) {
660 * credits for other reasons (e.g. requests are coming out of
661 * order and the server delays granting more credits until it
663 * credits there may be situations when we try to send
664 * a compound request but we don't have enough credits. At this
666 * additional credits or fail the request. If at least one
668 * server will return enough credits to satisfy this compound
672 * stuck on waiting for credits.
687 unsigned int *num, struct cifs_credits *credits)
690 credits->value = 0;
691 credits->instance = server->reconnect_instance;
783 struct cifs_credits credits = { .value = 0, .instance = 0 };
793 credits.value = 1;
794 credits.instance = instance;
801 * We can't use credits obtained from the previous session to send this
802 * request. Check if there were reconnects after we obtained credits and
807 add_credits_and_wake_if(server, &credits, optype);
814 add_credits_and_wake_if(server, &credits, optype);
837 revert_current_mid(server, mid->credits);
847 add_credits_and_wake_if(server, &credits, optype);
981 struct cifs_credits credits;
983 credits.value = server->ops->get_credits(mid);
984 credits.instance = server->reconnect_instance;
986 add_credits(server, &credits, mid->optype);
1038 struct cifs_credits credits[MAX_COMPOUND] = {
1060 * credits if the server doesn't grant credits to the outstanding
1071 credits[i].value = 1;
1072 credits[i].instance = instance;
1084 * All the parts of the compound chain belong obtained credits from the
1085 * same session. We can not use credits obtained from the previous
1087 * we obtained credits and return -EAGAIN in such cases to let callers
1093 add_credits(server, &credits[j], optype);
1107 add_credits(server, &credits[j], optype);
1115 * to calculate credits properly. Wake up this thread only when
1137 * will not receive a response to - return credits back
1141 add_credits(server, &credits[i], optype);
1147 * that any credits taken from the server structure on the client have
1149 * we will collect credits granted by the server in the mid callbacks
1150 * and add those credits to the server structure.
1178 credits[i].value = 0;
1308 struct cifs_credits credits = { .value = 1, .instance = 0 };
1334 rc = wait_for_free_request(server, flags, &credits.instance);
1348 add_credits(server, &credits, 0);
1379 add_credits(server, &credits, 0);
1387 add_credits(server, &credits, 0);
1403 add_credits(server, &credits, 0);