Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2018 03:04:19 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r331158 - stable/11/sys/sys
Message-ID:  <201803190304.w2J34J8Z084739@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Mon Mar 19 03:04:19 2018
New Revision: 331158
URL: https://svnweb.freebsd.org/changeset/base/331158

Log:
  MFC r314052:
  
  Document what the different flags mean for locking.

Modified:
  stable/11/sys/sys/bufobj.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/sys/bufobj.h
==============================================================================
--- stable/11/sys/sys/bufobj.h	Mon Mar 19 02:46:17 2018	(r331157)
+++ stable/11/sys/sys/bufobj.h	Mon Mar 19 03:04:19 2018	(r331158)
@@ -90,6 +90,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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803190304.w2J34J8Z084739>