volmonitor keep vtrans lock
authorDan Hyde <drh@umich.edu>
Wed, 13 Jan 2010 19:38:47 +0000 (14:38 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 14 Jan 2010 16:10:08 +0000 (08:10 -0800)
commitd4f6ece19b05f2233e53f2d3c59f92316ec5ec3a
tree1ddd28b098ba824a1aa45b0f44a71272e95bea61
parent64778fd7bece52360482f9a51f19b34dac1d2678
volmonitor keep vtrans lock

VolMonitor must maintain the VTRANS lock the whole time it is walking
the allTrans list.  Failure to do so can cause core dumps trying to
access memory that has already been free'd.

Two versions of this change were coded and tested.  The other version
used the VTRANS lock only around a THOLD, but needed a TRELE, too.
Timing tests were run counting the number of vos status, vos listvol,
and vos backupsys operations that could be performed during a fixed
number of vos status operations.  The THOLD/TRELE version caused other
vos operations to run about 5% slower.

FIXES 126110

Change-Id: I7e749d30c955867faacafa978d7d643dee648ca3
Reviewed-on: http://gerrit.openafs.org/1098
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/volser/volprocs.c