From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 12 18:31:55 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 378511065670 for ; Thu, 12 Jul 2012 18:31:55 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay06.ispgateway.de (smtprelay06.ispgateway.de [80.67.31.96]) by mx1.freebsd.org (Postfix) with ESMTP id B94DF8FC12 for ; Thu, 12 Jul 2012 18:31:54 +0000 (UTC) Received: from [84.44.178.238] (helo=fabiankeil.de) by smtprelay06.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1SpO51-0006sG-81; Thu, 12 Jul 2012 20:25:35 +0200 Date: Thu, 12 Jul 2012 20:17:41 +0200 From: Fabian Keil To: Benjamin Kaduk Message-ID: <20120712201741.34573af4@fabiankeil.de> In-Reply-To: References: <1341863341.6064.11.camel@powernoodle.corp.yahoo.com> <4FFB4770.7050209@FreeBSD.org> <20120710154128.192eb8d6@fabiankeil.de> <1341939155.2573.8.camel@powernoodle.corp.yahoo.com> <20120710205702.5e57168b@fabiankeil.de> <4FFC8479.9080608@FreeBSD.org> <20120711122935.1382e76d@fabiankeil.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/_EgWdIF1caHraz.QSKIGnRZ"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: freebsd-hackers@freebsd.org, Sean Bruno Subject: Re: dtraceall.ko with old nfsclient X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 18:31:55 -0000 --Sig_/_EgWdIF1caHraz.QSKIGnRZ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Benjamin Kaduk wrote: > On Wed, 11 Jul 2012, Fabian Keil wrote: >=20 > > I'm using the following modification of Sean's patch: This way it seems to work as expected: diff --git a/sys/modules/dtrace/dtraceall/Makefile b/sys/modules/dtrace/dtr= aceall/Makefile index 456efd1..628583b 100644 --- a/sys/modules/dtrace/dtraceall/Makefile +++ b/sys/modules/dtrace/dtraceall/Makefile @@ -1,7 +1,7 @@ # $FreeBSD: src/sys/modules/dtrace/dtraceall/Makefile,v 1.3 2011/04/09 09:= 07:31 uqs Exp $ KMOD=3D dtraceall -SRCS=3D dtraceall.c opt_compat.h +SRCS=3D dtraceall.c opt_compat.h opt_nfs.h CFLAGS+=3D -I${.CURDIR}/../../.. diff --git a/sys/modules/dtrace/dtraceall/dtraceall.c b/sys/modules/dtrace/= dtraceall/dtraceall.c index d256489..0672556 100644 --- a/sys/modules/dtrace/dtraceall/dtraceall.c +++ b/sys/modules/dtrace/dtraceall/dtraceall.c @@ -33,6 +33,7 @@ #include #include #include "opt_compat.h" +#include "opt_nfs.h" static int dtraceall_modevent(module_t mod __unused, int type, void *data __unused) @@ -67,8 +68,11 @@ MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1); MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1); MODULE_DEPEND(dtraceall, dtio, 1, 1, 1); MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1); +#if defined (NFSCL) MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1); +#elif defined (NFSCLIENT) MODULE_DEPEND(dtraceall, dtnfsclient, 1, 1, 1); +#endif #if defined(__amd64__) || defined(__i386__) MODULE_DEPEND(dtraceall, fbt, 1, 1, 1); MODULE_DEPEND(dtraceall, fasttrap, 1, 1, 1); > > Note that dtnfscl.ko is not loaded even though loading > > it manually works and I have NFSCL in the kernel. I wasn't entirely clear here, what I meant was that the KERNCONF used when compiling the module included "options NFSCL". I didn't expect run-time detection. > This is because dtraceall.c only #includes opt_compat.h, and the kernel=20 > build system only passes -include opt_global.h, so the dtraceall module=20 > build has no way of knowing about the NFSCL{IENT,} options defined in=20 > opt_nfs.h. (As you noted earlier in the thread?) Yes. > You would still need to address Andriy's comments in order to ensure that= =20 > the configuration seen by the module matches the kernel. Sure. Fabian --Sig_/_EgWdIF1caHraz.QSKIGnRZ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk//FMcACgkQBYqIVf93VJ2yTwCdGKuZD+8+fzB/V0rNGGSn/x/G +zEAoMclL8F9/52dQgi+V4tQjf+Pu0Br =1cUD -----END PGP SIGNATURE----- --Sig_/_EgWdIF1caHraz.QSKIGnRZ--