]> git.michaelhowe.org Git - packages/o/openafs.git/commit
viced: Check for HOSTDELETED in stillborn check
authorAndrew Deason <adeason@sinenomine.net>
Mon, 3 Oct 2011 18:10:44 +0000 (13:10 -0500)
committerDerrick Brashear <shadow@dementix.org>
Wed, 26 Oct 2011 22:55:15 +0000 (15:55 -0700)
commitbcccac5ccb89a9b4368bcef293913bcf98b8446c
tree238aae48165e9420bad73fff6f1d54e112818346
parentb33db8c7dee9ecf397d943fbc56cdf70dda5198e
viced: Check for HOSTDELETED in stillborn check

h_FindClient_r checks the connection rock for a client object twice.
First it sees if we already have a client object, and if we don't, we
effectively create one (or find a suitable one). Then we check again,
to see if someone else set the rock while we were creating a client
structure.

Currently, the first check checks if client->host->hostFlags has
HOSTDELETED set, but the second check does not. So, if the host
associated with the client has been deleted by someone else, currently
we will unnecessarily log a "stillborn client" message, and we will
continue to use the deleted host. If the host continues to be held by
someone, we will run into the same situation repeatedly on future
requests until all of the host references go away.

To fix this, also ignore HOSTDELETED clients when performing the
stillborn race check.

Reviewed-on: http://gerrit.openafs.org/5614
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit b5a153fb75bb6642490e9856dc6212244a590301)

Change-Id: I3fb0b01c2ef14cd077cd4db9476ed6e90c7d3c2a
Reviewed-on: http://gerrit.openafs.org/5719
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/viced/host.c