From: Tom Keiser Date: Mon, 12 Nov 2007 18:19:59 +0000 (+0000) Subject: DEVEL15-dafs-optimize-shutdown-20071112 X-Git-Tag: openafs-devel-1_5_28~59 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=198bc09264cdfc6822406864ae845008bb46ceb9;p=packages%2Fo%2Fopenafs.git DEVEL15-dafs-optimize-shutdown-20071112 optimize shutdown case as is done elsewhere, for dafs. (cherry picked from commit cd8311641fd32328dd1d8a07b1318ecb53726bd1) --- diff --git a/src/viced/host.c b/src/viced/host.c index 32761a994..ef1dca140 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -3327,6 +3327,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) {