VOL_LOCK needed when traversing DiskPartitionList
authorDan Hyde <drh@umich.edu>
Tue, 2 Feb 2010 15:37:47 +0000 (10:37 -0500)
committerDerrick Brashear <shadow@dementia.org>
Fri, 19 Mar 2010 03:53:55 +0000 (20:53 -0700)
commit105481d3348a93d33695fb705f9fa5c8af210e7e
tree43432782d180c5abb3ff0060bda85a15b0ad5433
parent028240329c09b6a311cb85736f41d75f7ee7a01f
VOL_LOCK needed when traversing DiskPartitionList

VLockPartition sets VOL_LOCK, opens (perhaps creating) the lock file
for a partition, and flock's it.  VUnlockPartition, sets VOL_LOCK, and
closes the lock file fd.

VLockPartition is called from the salvager.  Nothing ever calls
VUnlockPartition.

VPFullUnlock is called every 30 seconds, does NOT set VOL_LOCK, and
happily closes any lock file fd it finds, breaking any lock set with
flock.

Other routines use the VOL_LOCK when traversing DiskPartitionList.

Change-Id: I683547f574b1f760e72014f5d44ce3987f07b5df
Reviewed-on: http://gerrit.openafs.org/1213
Reviewed-by: Dan Hyde <drh@umich.edu>
Tested-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/volser/volprocs.c