Date: Tue, 21 Feb 2017 18:49:51 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314052 - head/sys/sys Message-ID: <201702211849.v1LInpWl020906@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702211849.v1LInpWl020906>