DAFS: avoid shutdown hang during salvage
authorAndrew Deason <adeason@sinenomine.net>
Wed, 29 Jul 2009 15:56:34 +0000 (11:56 -0400)
committerDerrick Brashear <shadow|account-1000005@unknown>
Tue, 1 Sep 2009 16:21:10 +0000 (09:21 -0700)
commit64bad257d66b7d70ebdb62a10217818730e2e0a6
treec9865e60ddec9892f218aa70b6a74901bd8439a2
parent5fd700d1fda856b0e16588cef0e54bc37498d375
DAFS: avoid shutdown hang during salvage

Right now, when the fileserver shuts down, it tries to cancel any
demand-salvages in progress. This causes the fileserver to hang, since
during shutdown, the salvageserver may already be gone. This avoids
cancelling in-progress salvages, and allows salvages to continue after
the fileserver has shut down.

To do this, the salvageserver now closes SALVSYNC sockets in spawned
children, so the children don't get SALVSYNC requests directed at them,
since they can't handle them. The salvageserver also now periodically
scans for logs of salvaging children that have terminated, and
incorporates them into SalsrvLog, just like it does for it's own
children. The salvageserver children that actually perform salvages now
also set the inUse volume header field to their programType, so the
fileserver knows not to schedule new salvages for that volume in the
event of a fileserver restart during a salvage.

FIXES 124486

Reviewed-on: http://gerrit.openafs.org/279
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/salvaged.c
src/vol/salvsync-server.c
src/vol/vol-salvage.c
src/vol/volume.c
src/vol/volume_inline.h