svn commit: r314052 - head/sys/sys

Warner Losh imp at FreeBSD.org
Tue Feb 21 18:49:53 UTC 2017


Author: imp
Date: Tue Feb 21 18:49:51 2017
New Revision: 314052
URL: https://svnweb.freebsd.org/changeset/base/314052

Log:
  Document what the different flags mean for locking.

Modified:
  head/sys/sys/bufobj.h

Modified: head/sys/sys/bufobj.h
==============================================================================
--- head/sys/sys/bufobj.h	Tue Feb 21 18:49:30 2017	(r314051)
+++ head/sys/sys/bufobj.h	Tue Feb 21 18:49:51 2017	(r314052)
@@ -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 */


More information about the svn-src-head mailing list