]> git.michaelhowe.org Git - packages/o/openafs.git/commit
DAFS: Do not serialize state for invalid hosts
authorAndrew Deason <adeason@sinenomine.net>
Thu, 29 Sep 2011 19:49:53 +0000 (14:49 -0500)
committerDerrick Brashear <shadow@dementix.org>
Sun, 9 Oct 2011 17:21:43 +0000 (10:21 -0700)
commit69a28651099e3c3ff9582c3dee04db1db47ac3f7
tree1a9744aabb1d6879828c74d12bb89de0d0ec686f
parent9378144f94425df4abbe818ae93b3eb06c49b43c
DAFS: Do not serialize state for invalid hosts

When we serialize host information for DAFS during shutdown, we have
no guarantee that the host is in a valid state when we look at it.
This can result in a host being saved to disk when we are waiting for
the host to respond to an RPC, and so the information about the host
is invalid. For example, we can save a host that has the
HWHO_INPROGRESS flag set, and when it is restored later, this can
cause odd behavior since the flag is set but no thread is actually
waiting for the host to respond.

So instead, during state serialization, try to determine if a host may
be in an invalid state, and simply skip the host if it may.

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

Change-Id: I9bf8cfec80ff9e626777375e94743ac621b52cb3
Reviewed-on: http://gerrit.openafs.org/5546
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/tviced/serialize_state.c
src/viced/host.c