]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-viced-shutdown-avoid-deadlock-20030424
authorRainer Toebbicke <rtb@pclella.cern.ch>
Thu, 15 May 2003 16:51:59 +0000 (16:51 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 15 May 2003 16:51:59 +0000 (16:51 +0000)
don't deadlock on H_LOCK if we need to shut down in an emergency

(cherry picked from commit 05be212fea360747dbe5a9681ca81459b3d6ac62)

src/viced/callback.c
src/viced/viced.c

index 9538686d8dcd4002296506bc6735daabac7ce8c7..be5561a1d24e1ae5dacda3ff4251c8e038890344 100644 (file)
@@ -442,7 +442,7 @@ static CDel(cb)
        assert(0);
        ViceLog(0,("CDel: Internal Error -- shutting down: wanted %d from %d, now at %d\n",cbi,fe->firstcb,*cbp));
        DumpCallBackState();
-       ShutDown();
+       ShutDownAndCore(PANIC);
       }
     }
     CDelPtr(fe, cbp);
@@ -492,7 +492,7 @@ static u_short *FindCBPtr(fe, host)
        if (safety > cbstuff.nblks) {
          ViceLog(0,("FindCBPtr: Internal Error -- shutting down.\n"));
          DumpCallBackState();
-         ShutDown();
+         ShutDownAndCore(PANIC);
        }
        cb = itocb(*cbp);
        if (cb->hhead == hostindex)
@@ -695,7 +695,7 @@ AddCallBack1_r(host, fid, thead, type, locked)
        if (safety > cbstuff.nblks) {
          ViceLog(0,("AddCallBack1: Internal Error -- shutting down.\n"));
          DumpCallBackState();
-         ShutDown();
+         ShutDownAndCore(PANIC);
        }
        if (cb->hhead == h_htoi(host))
            break;
@@ -1361,7 +1361,7 @@ CleanupTimedOutCallBacks_r()
                if (ntimedout > cbstuff.nblks) {
                  ViceLog(0,("CCB: Internal Error -- shutting down...\n"));
                  DumpCallBackState();
-                 ShutDown();
+                 ShutDownAndCore(PANIC);
                }
            } while (cbi != *thead);
            *thead = 0;
index a619631dde1149843854aa6338774113d3131566..19e6349dcb7f3a8326bee169bf207ad192759ce5 100644 (file)
@@ -898,7 +898,7 @@ int dopanic;
     }
 #endif
     DFlush();
-    PrintCounters();
+    if (!dopanic) PrintCounters();
 
     /* do not allows new reqests to be served from now on, all new requests
        are returned with an error code of RX_RESTARTING ( transient failure ) */