mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
ubik: Clarify UBIK_VERSION_LOCK semantics
Commit e4ac552a (ubik: Introduce version lock) added UBIK_VERSION_LOCK and version_data. The commit message mentions that holding either UBIK_VERSION_LOCK or DBHOLD is enough to be able to read the protected items and both locks must be held to modify them, but this isn't mentioned in the actual code. Add a comment explaining these locking rules, to make these rules clearer to readers. Change-Id: I715f89695add6d94e13d6ee1dc6addd1e748d3fd Reviewed-on: https://gerrit.openafs.org/13863 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
086d185872
commit
e68109013d
@ -417,7 +417,9 @@ struct addr_data {
|
||||
|
||||
/*!
|
||||
* \brief The version lock protects the structure member, as well as
|
||||
* the database version, flags, tidCounter, writeTidCounter
|
||||
* the database version, flags, tidCounter, writeTidCounter. Reading these
|
||||
* values can be done while holding either UBIK_VERSION_LOCK or DBHOLD. Writing
|
||||
* these requires holding both locks.
|
||||
*/
|
||||
struct version_data {
|
||||
#ifdef AFS_PTHREAD_ENV
|
||||
|
Loading…
x
Reference in New Issue
Block a user