]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
viced: Set HWHO_INPROGRESS in CheckHost_r
authorAndrew Deason <adeason@sinenomine.net>
Fri, 4 Mar 2011 17:35:06 +0000 (11:35 -0600)
committerDerrick Brashear <shadow@dementia.org>
Sat, 5 Mar 2011 11:52:21 +0000 (03:52 -0800)
When we are probing a host in CheckHost_r, set the HWHO_INPROGRESS
flag on the host, so other threads know that the host is locked while
we are waiting for a probe response, and the h_threadquota mechanism
can work correctly.

Reviewed-on: http://gerrit.openafs.org/4126
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 64d52938ee26e160a6e2cd64253df096eb5d0c1e)

Change-Id: I168fb4cf80106bcaf3f846df68ab5a98b65365ab
Reviewed-on: http://gerrit.openafs.org/4127
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/viced/host.c

index c7318f00eada260924d99a523ec1a832e97fca15..4f1dd756132f2e29054bd2e18dc00c8f0d219da7 100644 (file)
@@ -3838,6 +3838,7 @@ CheckHost_r(struct host *host, int flags, void *dummy)
     if (host->LastCall < checktime) {
        h_Lock_r(host);
        if (!(host->hostFlags & HOSTDELETED)) {
+           host->hostFlags |= HWHO_INPROGRESS;
            cb_conn = host->callback_rxcon;
            rx_GetConnection(cb_conn);
            if (host->LastCall < clientdeletetime) {
@@ -3905,6 +3906,7 @@ CheckHost_r(struct host *host, int flags, void *dummy)
            rx_PutConnection(cb_conn);
            cb_conn=NULL;
            H_LOCK;
+           host->hostFlags &= ~HWHO_INPROGRESS;
        }
        h_Unlock_r(host);
     }