xfs
[Top] [All Lists]

Re: Can't build kernal with DMAPI as a module in 2.4 CVS

To: Dean Roehrich <roehrich@xxxxxxx>
Subject: Re: Can't build kernal with DMAPI as a module in 2.4 CVS
From: Keith Owens <kaos@xxxxxxx>
Date: Fri, 19 Apr 2002 14:25:59 +1000
Cc: matthew@xxxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx
In-reply-to: Your message of "Thu, 18 Apr 2002 23:18:08 EST." <200204190418.XAA76645@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Thu, 18 Apr 2002 23:18:08 -0500, 
Dean Roehrich <roehrich@xxxxxxx> wrote:
>>dep_tristate enforces CONFIG_XFS_FS=m -> CONFIG_XFS_DMAPI=[mn]
>
>Ah, but apparently it doesn't enforce the other way.  XFS=y -> DMAPI=[yn].
>Why would that be?

Designed that way.  The kernel config assumes a hierarchy of code, with
the base code being selected first and options later, with the optional
code calling the base, not the other way around.  Then the base code
can be built in and the optional code can be a module, so BASE=y with
OPTIONAL=m is assumed to be valid.  XFS/DMAPI is awkward because the
base XFS code calls the optional DMAPI code directly, breaking the
assumptions of dep_tristate.

If you want the optional code to be a module when the base code is
built in then direct function calls from base to optional are out.
Instead the base code has to call the optional code via a function
pointer and check if that pointer is filled in before using it.


<Prev in Thread] Current Thread [Next in Thread>