dtraceall.ko with old nfsclient

Fabian Keil freebsd-listen at fabiankeil.de
Tue Jul 10 18:57:58 UTC 2012


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

> On Tue, 2012-07-10 at 06:41 -0700, Fabian Keil wrote:
> > > >
> > --- //depot/yahoo/ybsd_9/src/sys/modules/dtrace/dtraceall/dtraceall.c
> > > > 2011-11-02 23:46:55.000000000 0000
> > > >
> > +++ /home/seanbru/dtrace_9/src/sys/modules/dtrace/dtraceall/dtraceall.c
> > > > 2011-11-02 23:46:55.000000000 0000
> > > > @@ -66,8 +66,11 @@
> > > >  MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1);
> > > >  MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1);
> > > >  MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1);
> > > > +#if defined (NFSCL)
> > > >  MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1);
> > > > +#else /* defined (NFSCLIENT) */
> > 
> > Any objections to changing this to
> > #elif defined (NFSCLIENT)
> > ? 
> 
> No objections here.  I suspect that this is the more correct thing
> regardless.  I mean, it keeps the nfs dtrace objects loading in the
> event someone is running a non-nfs kernel... right?

I do not use a completely NFS-free kernel, but I don't build any
NFS-related modules. Trying to load an unpatched dtraceall results in:

Jul  9 21:58:48 r500 sudo:       fk : TTY=pts/16 ; PWD=/home/fk ; USER=root ; COMMAND=/sbin/kldload dtraceall
Jul  9 21:58:48 r500 kernel: [8922] KLD dtnfsclient.ko: depends on oldnfs - not available or version mismatch
Jul  9 21:58:48 r500 kernel: [8922] linker_load_file: Unsupported file type
Jul  9 21:58:48 r500 kernel: [8922] KLD dtraceall.ko: depends on dtnfsclient - not available or version mismatch
Jul  9 21:58:48 r500 kernel: [8922] linker_load_file: Unsupported file type

My assumption was that your patch and the "#elif defined (NFSCLIENT)"
would fix that, and indeed it does, but I later on realized that I
actually do have NFSCL in the kernel:

fk at r500 /usr/src $sysctl kern.conftxt | grep NFS
options NFS_ROOT
options NFSLOCKD
options NFSD
options NFSCL

My impression is that the patch is missing an opt_nfs.h
inclusion combined with the Makefile voodoo to create the file.

The dtraceall module already has an opt_compat.h, even though the
Makefile logic to create it seems a bit dubious to me. It blindly
assumes that COMPAT_FREEBSD32 is available on amd64.

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20120710/e3046a8b/signature.pgp


More information about the freebsd-hackers mailing list