DAFS: do not save or restore host state if CPS in progress
commit38a3f51fb8b3910ecdd7cacb06f35ec681990aea
authorMark Vitale <mvitale@sinenomine.net>
Tue, 21 Feb 2017 01:16:47 +0000 (20 20:16 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 10 Mar 2017 00:45:26 +0000 (9 19:45 -0500)
tree4a315dee96a324605d9315d6e409c359ca13d445
parentbd15a5f56fde98983464acf5fd4cdd731d206d9f
DAFS: do not save or restore host state if CPS in progress

If a fileserver is shutdown while one or more PR_GetHostCPS calls
are in progress, this state is saved in the fsstate.dat file as
hostFlags HCPS_WAITING, HCPS_INPROGRESS.  Other hosts that are
merely waiting will have HCPS_WAITING recorded.

However, it makes no sense to restore host structs in this state,
because the GetCPS calls will no longer be in progress.  Once these
hosts become active, they will block server threads and quickly cause
all server threads to be exhausted as other CPS requests are blocked
behind them.

Instead, exclude these states from both save and restore.

Change-Id: I3fad67b70c96dc967d6f8e3a7b393cfda076c91d
Reviewed-on: https://gerrit.openafs.org/12561
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/viced/host.c