Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2012 18:48:13 +0200
From:      Fabian Keil <freebsd-listen@fabiankeil.de>
To:        Sean Bruno <seanbru@yahoo-inc.com>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: dtraceall.ko with old nfsclient
Message-ID:  <20120731184813.04bd8dc2@fabiankeil.de>
In-Reply-To: <1343429097.5002.14.camel@powernoodle.corp.yahoo.com>
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> <alpine.GSO.1.10.1207112007240.18441@multics.mit.edu> <20120712201741.34573af4@fabiankeil.de> <4FFF2171.1030800@FreeBSD.org> <20120712213615.39640d1f@fabiankeil.de> <4FFF27F0.4000106@FreeBSD.org> <742407DF-8026-4976-A1F9-A170A62EF87A@averesystems.com> <1343429097.5002.14.camel@powernoodle.corp.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/IauXZrZjSDtAROh/qOoS3Zp
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Sean Bruno <seanbru@yahoo-inc.com> wrote:

> On Thu, 2012-07-12 at 12:47 -0700, Andrew Boyer wrote:
> > On Jul 12, 2012, at 3:39 PM, Andriy Gapon wrote:
> >=20
> > > on 12/07/2012 22:36 Fabian Keil said the following:
> > >> Andriy Gapon <avg@FreeBSD.org> wrote:
> > >>=20
> > >>> on 12/07/2012 21:17 Fabian Keil said the following:
> > >>>> Benjamin Kaduk <kaduk@MIT.EDU> wrote:
> > >>>>=20
> > >>>>> On Wed, 11 Jul 2012, Fabian Keil wrote:
> > >>>>>=20
> > >>>>>> I'm using the following modification of Sean's patch:
> > >>>>=20
> > >>>> This way it seems to work as expected:
> > >>>>=20
> > >>>> diff --git a/sys/modules/dtrace/dtraceall/Makefile=20
> > >>>> b/sys/modules/dtrace/dtraceall/Makefile index 456efd1..628583b 100=
644
> > >>>> --- a/sys/modules/dtrace/dtraceall/Makefile +++=20
> > >>>> b/sys/modules/dtrace/dtraceall/Makefile @@ -1,7 +1,7 @@ # $FreeBSD=
:=20
> > >>>> src/sys/modules/dtrace/dtraceall/Makefile,v 1.3 2011/04/09 09:07:3=
1 uqs
> > >>>> Exp $
> > >>>>=20
> > >>>> KMOD=3D          dtraceall -SRCS=3D          dtraceall.c opt_compa=
t.h
> > >>>> +SRCS=3D dtraceall.c opt_compat.h opt_nfs.h
> > >>>>=20
> > >>>> CFLAGS+=3D       -I${.CURDIR}/../../..
> > >>>>=20
> > >>>=20
> > >>> If you do cd sys/modules/dtrace/dtraceall && make [obj depend] all,=
 does
> > >>> it compile OK with the above change?
> > >>=20
> > >> Depends on your expectations I guess. As neither NFS-related option =
gets
> > >> defined, no dependency on either NFS module is registered. The compi=
ler has
> > >> no complaints, though.
> > >=20
> > > Interesting.  Could you repeat after sufficient cleaning up?
> > > I am not sure where from opt_nfs.h file could come.
> > >=20
> >=20
> > Maybe related: check out sys/modules/ipfw/Makefile.  It makes its own o=
ption headers for INET and INET6.

I think guessing that INET and INET6 are available is a lot more
reasonable than doing the same for the external NFS modules.

> I've pondered this on an off for a couple of weeks now.  I can clearly
> see that if we want compile time dependencies, that's fine, we can make
> each nfclient object dependant on the #define.  Both are valid cases to
> have loaded though, so they shouldn't be conditional on each other as in
> my patches.
>=20
> If one does this however, the module makefile needs to be adjusted like
> the ipfw makefile to create an opt_nfs.h with the NFS client defines,
> else you will have neither dtrace object available.
>=20
> There isn't a clear way that I can see to compile dtraceall.ko as a
> module if you are doing so outside of the kernel compile though.  The
> module tree isn't really aware of what you are running, therefore it
> would have to compile to load both regardless.  Which, if your kernel
> doesn't support one or both nfs objects, will cause a kldload failure.

In my opinion depending on neither nfs modules when the module
is build manually is preferable to depending on both.

For users without the nfs modules available, forcing the dependencies
renders the dtraceall module useless, while users who want to dtrace nfs
can still use dtraceall and simply load the nfs module manually afterwards
if the dependency is missing.

Fabian

--Sig_/IauXZrZjSDtAROh/qOoS3Zp
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlAYDFYACgkQBYqIVf93VJ2SiACeLrKP9UjW4cBhN0iJoFd2NK39
CHMAoIhjlgQhcMrrOWZY8tBkrSZSTRT+
=OjOz
-----END PGP SIGNATURE-----

--Sig_/IauXZrZjSDtAROh/qOoS3Zp--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120731184813.04bd8dc2>