- Document more of the vnode locking strategy.

This commit is contained in:
Jeff Roberson 2003-10-04 14:32:55 +00:00
parent 04a17687ea
commit c31e93450f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120742

View File

@ -95,8 +95,17 @@ struct vpollinfo {
* u - Only a reference to the vnode is needed to read.
* v - vnode lock
*
* Vnodes may be found on many lists. The general way to deal with operating
* on a vnode that is on a list is:
* 1) Lock the list and find the vnode.
* 2) Lock interlock so that the vnode does not go away.
* 3) Unlock the list to avoid lock order reversals.
* 4) vget with LK_INTERLOCK and check for ENOENT, or
* 5) Check for XLOCK if the vnode lock is not required.
* 6) Perform your operation, then vput().
*
* XXX Not all fields are locked yet and some fields that are marked are not
* locked consistently. This is a work in progress.
* locked consistently. This is a work in progress. Requires Giant!
*/
struct vnode {