ubik: Clarify UBIK_VERSION_LOCK semantics 63/13863/4
authorAndrew Deason <adeason@sinenomine.net>
Thu, 12 Sep 2019 17:37:04 +0000 (12:37 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 13 Mar 2020 16:22:13 +0000 (12:22 -0400)
commite68109013d03829f2e9dc95586933212a0ea9ad7
treeb386220fe53fca9fff055a360449895f02b38a73
parent086d185872da5f19447cf5ec7846e7ce5104563f
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>
src/ubik/ubik.p.h