Date: Thu, 13 Jul 2023 18:30:07 GMT From: Doug Moore <dougm@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 8f056492c5e8 - main - vfs_bio: initialize pctries Message-ID: <202307131830.36DIU77d012917@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=8f056492c5e846912589dd0e9ceb4f8e682f2782 commit 8f056492c5e846912589dd0e9ceb4f8e682f2782 Author: Doug Moore <dougm@FreeBSD.org> AuthorDate: 2023-07-13 18:28:21 +0000 Commit: Doug Moore <dougm@FreeBSD.org> CommitDate: 2023-07-13 18:28:21 +0000 vfs_bio: initialize pctries bufobj_init depends on fields bo_dirty.bv_root and bo_clean.bv_root being zeroed on entry and pctrie_init zeroing whatever is passed to them, and so does not call pctrie_init for either of them. That fails if pctrie_init ever changes to do something other that zeroing data, so add explicit calls to them. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D40978 --- sys/kern/vfs_bio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index cf01d2a239ea..98b267f89737 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/kernel.h> #include <sys/kthread.h> +#include <sys/pctrie.h> #include <sys/proc.h> #include <sys/racct.h> #include <sys/refcount.h> @@ -5152,7 +5153,9 @@ bufobj_init(struct bufobj *bo, void *private) rw_init(BO_LOCKPTR(bo), "bufobj interlock"); bo->bo_private = private; TAILQ_INIT(&bo->bo_clean.bv_hd); + pctrie_init(&bo->bo_clean.bv_root); TAILQ_INIT(&bo->bo_dirty.bv_hd); + pctrie_init(&bo->bo_dirty.bv_root); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307131830.36DIU77d012917>