rx: Generate BUSY packets for error call channels
authorAndrew Deason <adeason@sinenomine.net>
Wed, 14 Nov 2012 04:46:34 +0000 (22:46 -0600)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 27 Nov 2012 04:02:41 +0000 (20:02 -0800)
Currently, if a call is error'd out but still active, we won't
generate BUSY packets if another call comes in on the same channel.
This is because we bail out earlier, here, before we get to the BUSY
processing.

The comments suggest that this is for if we enter an error state while
waiting for TQ to clear. So, only do this if our error has changed.

Change-Id: I070f2af16bc79b1ebc7d19b7cb761fdbca78344b
Reviewed-on: http://gerrit.openafs.org/8460
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/rx/rx.c

index 45861e5..1a08e30 100644 (file)
@@ -3311,12 +3311,13 @@ rxi_ReceiveServerCall(osi_socket socket, struct rx_packet *np,
      */
 #ifdef RX_ENABLE_LOCKS
     if (call->state == RX_STATE_ACTIVE) {
+       int old_error = call->error;
        rxi_WaitforTQBusy(call);
         /* If we entered error state while waiting,
          * must call rxi_CallError to permit rxi_ResetCall
          * to processed when the tqWaiter count hits zero.
          */
-        if (call->error) {
+        if (call->error && call->error != old_error) {
            rxi_CallError(call, call->error);
            MUTEX_EXIT(&call->lock);
             return NULL;