]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-fix-busyat-enforcement-20050819
authorDerrick Brashear <shadow@dementia.org>
Sun, 28 Aug 2005 21:43:36 +0000 (21:43 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 28 Aug 2005 21:43:36 +0000 (21:43 +0000)
FIXES 20659

enforce busyat in the other half of the if

(cherry picked from commit aec3c2b19292c552705f1c0eb3065a26e0b03649)

src/rx/rx.c

index 018d00362ec5a6909a3777a2ea2893d0025db6c0..fcbcb97f368698cf31fe3638e2cabaafc5921428 100644 (file)
@@ -2602,6 +2602,24 @@ rxi_ReceivePacket(register struct rx_packet *np, osi_socket socket,
            clock_GetTime(&call->queueTime);
            hzero(call->bytesSent);
            hzero(call->bytesRcvd);
+           /*
+            * If the number of queued calls exceeds the overload
+            * threshold then abort this call.
+            */
+           if ((rx_BusyThreshold > 0) && (rx_nWaiting > rx_BusyThreshold)) {
+               struct rx_packet *tp;
+               
+               rxi_CallError(call, rx_BusyError);
+               tp = rxi_SendCallAbort(call, np, 1, 0);
+               MUTEX_EXIT(&call->lock);
+               MUTEX_ENTER(&conn->conn_data_lock);
+               conn->refCount--;
+               MUTEX_EXIT(&conn->conn_data_lock);
+               MUTEX_ENTER(&rx_stats_mutex);
+               rx_stats.nBusies++;
+               MUTEX_EXIT(&rx_stats_mutex);
+               return tp;
+           }
            rxi_KeepAliveOn(call);
        } else if (np->header.callNumber != currentCallNumber) {
            /* Wait until the transmit queue is idle before deciding