Document what the different flags mean for locking.

This commit is contained in:
Warner Losh 2017-02-21 18:49:51 +00:00
parent 6fc94bc49f
commit ac027d9307

View File

@ -88,6 +88,12 @@ struct buf_ops {
#define BO_WRITE(bo, bp) ((bo)->bo_ops->bop_write((bp)))
#define BO_BDFLUSH(bo, bp) ((bo)->bo_ops->bop_bdflush((bo), (bp)))
/*
* Locking notes:
* 'S' is sync_mtx
* 'v' is the vnode lock which embeds the bufobj.
* '-' Constant and unchanging after initialization.
*/
struct bufobj {
struct rwlock bo_lock; /* Lock which protects "i" things */
struct buf_ops *bo_ops; /* - Buffer operations */