]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
dafs-optimize-shutdown-20071112
authorTom Keiser <tkeiser@sinenomine.net>
Mon, 12 Nov 2007 18:17:43 +0000 (18:17 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 12 Nov 2007 18:17:43 +0000 (18:17 +0000)
optimize shutdown case as is done elsewhere, for dafs.

src/viced/host.c

index 24809b5d2f746d9627fa4fe09a9fa5db59a1b6f3..54247a8948203c653ece89850ea60a239d965439 100644 (file)
@@ -3328,6 +3328,16 @@ CheckHost_r(register struct host *host, int held, char *dummy)
     struct rx_connection *cb_conn = NULL;
     int code;
 
+#ifdef AFS_DEMAND_ATTACH_FS
+    /* kill the checkhost lwp ASAP during shutdown */
+    FS_STATE_RDLOCK;
+    if (fs_state.mode == FS_MODE_SHUTDOWN) {
+       FS_STATE_UNLOCK;
+       return H_ENUMERATE_BAIL(held);
+    }
+    FS_STATE_UNLOCK;
+#endif
+
     /* Host is held by h_Enumerate_r */
     for (client = host->FirstClient; client; client = client->next) {
        if (client->refCount == 0 && client->LastCall < clientdeletetime) {