From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 27 22:45:39 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C9DC1065677; Fri, 27 Jul 2012 22:45:39 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 0F3818FC21; Fri, 27 Jul 2012 22:45:38 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q6RMiv46059673; Fri, 27 Jul 2012 15:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1343429098; bh=N7XIWWvktNbgEXDlAj33k/me8kMw5+rbK9ZmjOxj2K8=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=nASMT+UqBJFeRtswb4v0rof346goEvmmIuZ53hfGv27VDr/rOwouTiCtFuA/lLfnU jM+lfh2xTiK5iXQEpGPryLu7aqU0Lm89DtCuXBu5TklWNmqfzIOGLaOS2i2g+la6T6 GbqscixyxLfpB4abjGFu3QiDSK1YycVI0Cx2T094= From: Sean Bruno To: Andrew Boyer In-Reply-To: <742407DF-8026-4976-A1F9-A170A62EF87A@averesystems.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> <20120712201741.34573af4@fabiankeil.de> <4FFF2171.1030800@FreeBSD.org> <20120712213615.39640d1f@fabiankeil.de> <4FFF27F0.4000106@FreeBSD.org> <742407DF-8026-4976-A1F9-A170A62EF87A@averesystems.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 27 Jul 2012 15:44:57 -0700 Message-ID: <1343429097.5002.14.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 429097007 Cc: "freebsd-hackers@FreeBSD.org" , Fabian Keil , Andriy Gapon 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: Fri, 27 Jul 2012 22:45:39 -0000 On Thu, 2012-07-12 at 12:47 -0700, Andrew Boyer wrote: > On Jul 12, 2012, at 3:39 PM, Andriy Gapon wrote: > > > on 12/07/2012 22:36 Fabian Keil said the following: > >> Andriy Gapon wrote: > >> > >>> on 12/07/2012 21:17 Fabian Keil said the following: > >>>> Benjamin Kaduk wrote: > >>>> > >>>>> On Wed, 11 Jul 2012, Fabian Keil wrote: > >>>>> > >>>>>> 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/dtraceall/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= dtraceall -SRCS= dtraceall.c opt_compat.h > >>>> +SRCS= dtraceall.c opt_compat.h opt_nfs.h > >>>> > >>>> CFLAGS+= -I${.CURDIR}/../../.. > >>>> > >>> > >>> If you do cd sys/modules/dtrace/dtraceall && make [obj depend] all, does > >>> it compile OK with the above change? > >> > >> Depends on your expectations I guess. As neither NFS-related option gets > >> defined, no dependency on either NFS module is registered. The compiler has > >> no complaints, though. > > > > Interesting. Could you repeat after sufficient cleaning up? > > I am not sure where from opt_nfs.h file could come. > > > > Maybe related: check out sys/modules/ipfw/Makefile. It makes its own option headers for INET and INET6. > > -A > > -------------------------------------------------- > Andrew Boyer aboyer@averesystems.com > > > > 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. 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. 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. I'm not real clear how to unwind this situation. Sean