NetBSD Problem Report #769
From gnats Mon Jan 30 01:32:12 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id BAA12158 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 30 Jan 1995 01:32:12 -0800
Message-Id: <199501300931.BAA01406@Reno.Stanford.EDU>
Date: Mon, 30 Jan 1995 01:31:39 -0800
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Reply-To: jonathan@DSG.Stanford.EDU
To: gnats-bugs@NetBSD.ORG
Subject: mismatch between DEBUG and DIAGNOSTIC over vfs_bufstats()
X-Send-Pr-Version: 3.2
>Number: 769
>Category: kern
>Synopsis: mismatch between DEBUG and DIAGNOSTIC over vfs_bufstats()
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jan 30 01:35:01 +0000 1995
>Closed-Date: Fri Jun 23 02:17:32 +0000 1995
>Last-Modified:
>Originator: Jonathan Stone
>Release: 1995-01-29
>Organization:
" representing myself"
>Environment:
pmax, NetBSD-current, pmax, no libraries
System: NetBSD Reno.Stanford.EDU 1.0A NetBSD 1.0A (CURRENT) #73: Sun Jan 29 23:59:35 PST 1995 jonathan@Reno.Stanford.EDU:/greyhawk/n1/src/NetBSD/src/sys/arch/pmax/compile/CURRENT pmax
>Description:
kern/vfs_bio.c:vfs_bufstats() is wrapped in #ifdef DIAGNOSTIC/#endif,
so it is only defined when a kernel is configured with the
DIAGNOSTIC option. Yet, as the comment above vfs_bufstat clearly
states, vfs_bufstat() may be called from within sync() if
"syncprt" has been set with sysctl. The "syncprt" sysctl,
and the conditional call to vfs_bufstat(), are present
if (and only if) DEBUG is defined.
Clearly, vfs_bufstat() should be selected by if DEBUG is defined.
>How-To-Repeat:
Build a kernel with DEBUG defined but not DIAGNOSTIC.
_vfs_bufstat will not be resolved and the kernel won't link.
>Fix:
Change the DIAGNOSTIC in vfs_bio.c:line 779 to DEBUG .
Or, if appropriate, #if defined(DEBUG) || defined(DIAGNOSTIC).
Or don't build kernels without DIAGNOSTIC. Which is a pain, if one
is trying to get performance measurements.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: cgd
State-Changed-When: Thu Jun 22 22:17:32 EDT 1995
State-Changed-Why:
fixed the other day, after further prompting.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.