From owner-freebsd-geom@FreeBSD.ORG Fri Jan 7 17:46:43 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAED4106564A; Fri, 7 Jan 2011 17:46:43 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from ftp.translate.ru (ftp.translate.ru [80.249.188.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7593A8FC1C; Fri, 7 Jan 2011 17:46:42 +0000 (UTC) Received: from [192.168.134.2] (89.112.15.178.pppoe.eltel.net [89.112.15.178]) (Authenticated sender: lev@serebryakov.spb.ru) by ftp.translate.ru (Postfix) with ESMTPA id CF2A013DF5F; Fri, 7 Jan 2011 20:28:15 +0300 (MSK) Date: Fri, 7 Jan 2011 20:28:10 +0300 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <903352167.20110107202810@serebryakov.spb.ru> To: John Baldwin In-Reply-To: <201101070820.24144.jhb@freebsd.org> References: <1241746160.20110107151559@serebryakov.spb.ru> <201101070820.24144.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: phk@freebsd.org, freebsd-geom@freebsd.org Subject: Re: Building "third-party" modules for kernel with debug options? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2011 17:46:44 -0000 Hello, John. You wrote 7 =FF=ED=E2=E0=F0=FF 2011 =E3., 16:20:23: >> I've found, that "struct bio" is depend on state of "DIAGNOSTIC" >> flag ("options DIAGNOSTIC" in kernel config). But when I build >> third-party GEOM (or any other) module with using of , >> there is no access to these options. So, module, built from ports, can >> fail on user's kernel, even if it built with proper kernel sources in >> "/usr/src/sys". Is here any solution for this problem? >>=20 >> P.S. NB: GEOM module is only example, question is about modules & >> kernel options in general, so I put this message on Hackers list. > In general we try to avoid having "public" kernel data structures change = size > when various kernel options are in use. Some noticeable exceptions to th= is > rule are PAE (i386-only) and LOCK_PROFILING (considered to be something u= sers > would not typically use). DIAGNOSTIC might arguably be considered the sa= me as > LOCK_PROFILING, but I am surprised it affects bio. It should only affect= a > GEOM module that uses bio_pblockno however in this case since you should = be > using kernel routines to allocate bio structures rather than malloc'ing o= ne > directly. Perhaps phk@ would ok moving bio_pblockno up above the optional > diagnostic fields. I've got "bio_caller2 used by the provider XXX" panic when kernel had DIAGNOSTIC and goem_raid5 had not... I've redirected this answer into GEOM list, as it is more GEOM-specific than my original message. --=20 // Black Lion AKA Lev Serebryakov