public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Problems with Kconfig select across directories
@ 2011-10-14 14:35 Boaz Harrosh
  2011-10-14 21:34 ` Paul Bolle
  2011-10-14 22:03 ` Michal Marek
  0 siblings, 2 replies; 6+ messages in thread
From: Boaz Harrosh @ 2011-10-14 14:35 UTC (permalink / raw)
  To: Michal Marek, Randy Dunlap, Trond Myklebust, linux-kernel,
	NFS list

I have this weird problem with Kconfig.

In fs/exofs/Kconfig I have:

# Library to be selected by users
config ORE
	tristate

Then
config EXOFS_FS
	tristate "exofs: OSD based file system support"
	depends on SCSI_OSD_ULD
	select ORE
	help ...

So far so good. Choosing EXOFS_FS in xmenuconfig works fine as expected.
But now I add another user say: (It's more complicated but even below does
not work)

config NFS_FS
	tristate "NFS client support"
	depends on INET && FILE_LOCKING
	select LOCKD
	select SUNRPC
	select NFS_ACL_SUPPORT if NFS_V3_ACL
	select ORE
	help ...

This does not work. The ORE is not compiled and MODPOST complains.
(Given EXOFS_FS is not selected since then it will work)

What am I doing wrong? Why can't I "select" in fs/nfs/Kconfig
an option in fs/exofs/Kconfig? What can I do different?

Thanks
Boaz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with Kconfig select across directories
  2011-10-14 14:35 Problems with Kconfig select across directories Boaz Harrosh
@ 2011-10-14 21:34 ` Paul Bolle
  2011-10-14 22:03 ` Michal Marek
  1 sibling, 0 replies; 6+ messages in thread
From: Paul Bolle @ 2011-10-14 21:34 UTC (permalink / raw)
  To: Boaz Harrosh
  Cc: Michal Marek, Randy Dunlap, Trond Myklebust, linux-kernel,
	NFS list

On Fri, 2011-10-14 at 16:35 +0200, Boaz Harrosh wrote:
> This does not work. The ORE is not compiled and MODPOST complains.
> (Given EXOFS_FS is not selected since then it will work)
> 
> What am I doing wrong? Why can't I "select" in fs/nfs/Kconfig
> an option in fs/exofs/Kconfig? What can I do different?

We're not given much to go by here. So I'll just mention the first thing
that I could think of: are you sure all NFS_FS's dependencies are met
(like NETWORK_FILESYSTEMS)?


Paul Bolle


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with Kconfig select across directories
  2011-10-14 14:35 Problems with Kconfig select across directories Boaz Harrosh
  2011-10-14 21:34 ` Paul Bolle
@ 2011-10-14 22:03 ` Michal Marek
  2011-10-14 22:27   ` Boaz Harrosh
  1 sibling, 1 reply; 6+ messages in thread
From: Michal Marek @ 2011-10-14 22:03 UTC (permalink / raw)
  To: Boaz Harrosh; +Cc: Randy Dunlap, Trond Myklebust, linux-kernel, NFS list

On 14.10.2011 16:35, Boaz Harrosh wrote:
> I have this weird problem with Kconfig.
> 
> In fs/exofs/Kconfig I have:
> 
> # Library to be selected by users
> config ORE
> 	tristate
> 
> Then
> config EXOFS_FS
> 	tristate "exofs: OSD based file system support"
> 	depends on SCSI_OSD_ULD
> 	select ORE
> 	help ...
> 
> So far so good. Choosing EXOFS_FS in xmenuconfig works fine as expected.
> But now I add another user say: (It's more complicated but even below does
> not work)
> 
> config NFS_FS
> 	tristate "NFS client support"
> 	depends on INET && FILE_LOCKING
> 	select LOCKD
> 	select SUNRPC
> 	select NFS_ACL_SUPPORT if NFS_V3_ACL
> 	select ORE
> 	help ...
> 
> This does not work. The ORE is not compiled and MODPOST complains.
> (Given EXOFS_FS is not selected since then it will work)

fs/Makefile only visits fs/exofs if CONFIG_EXOFS_FS is set.

Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with Kconfig select across directories
  2011-10-14 22:03 ` Michal Marek
@ 2011-10-14 22:27   ` Boaz Harrosh
  2011-10-14 22:45     ` Michal Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Boaz Harrosh @ 2011-10-14 22:27 UTC (permalink / raw)
  To: Michal Marek, Paul Bolle
  Cc: Randy Dunlap, Trond Myklebust, linux-kernel, NFS list

On 10/15/2011 12:03 AM, Michal Marek wrote:
> On 14.10.2011 16:35, Boaz Harrosh wrote:
>> I have this weird problem with Kconfig.
>>
>> In fs/exofs/Kconfig I have:
>>
>> # Library to be selected by users
>> config ORE
>> 	tristate
>>
>> Then
>> config EXOFS_FS
>> 	tristate "exofs: OSD based file system support"
>> 	depends on SCSI_OSD_ULD
>> 	select ORE
>> 	help ...
>>
>> So far so good. Choosing EXOFS_FS in xmenuconfig works fine as expected.
>> But now I add another user say: (It's more complicated but even below does
>> not work)
>>
>> config NFS_FS
>> 	tristate "NFS client support"
>> 	depends on INET && FILE_LOCKING
>> 	select LOCKD
>> 	select SUNRPC
>> 	select NFS_ACL_SUPPORT if NFS_V3_ACL
>> 	select ORE
>> 	help ...
>>
>> This does not work. The ORE is not compiled and MODPOST complains.
>> (Given EXOFS_FS is not selected since then it will work)
> 
> fs/Makefile only visits fs/exofs if CONFIG_EXOFS_FS is set.
> 
> Michal

Bingo. Right on the money. With below patch it works. I'll think
about it some more and submit.

Thanks
---
exofs/ore: Select fs/exofs/ folder in Makefile also for ORE only compilation

If any thing from fs/exofs is set the ORE will be selected. So conditionally
include fs/exofs in fs/Makefile on ORE set and not EXOFS_FS

Boaz
---
git diff --stat -p -M
 fs/Makefile    |    2 +-
 fs/nfs/Kconfig |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/Makefile b/fs/Makefile
index afc1096..d7a88b5 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -120,6 +120,6 @@ obj-$(CONFIG_DEBUG_FS)		+= debugfs/
 obj-$(CONFIG_OCFS2_FS)		+= ocfs2/
 obj-$(CONFIG_BTRFS_FS)		+= btrfs/
 obj-$(CONFIG_GFS2_FS)           += gfs2/
-obj-$(CONFIG_EXOFS_FS)          += exofs/
+obj-$(CONFIG_ORE)		+= exofs/
 obj-$(CONFIG_CEPH_FS)		+= ceph/
 obj-$(CONFIG_PSTORE)		+= pstore/
diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index dbcd821..1c13c34 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -96,6 +96,7 @@ config PNFS_BLOCK
 config PNFS_OBJLAYOUT
 	tristate
 	depends on NFS_FS && NFS_V4_1 && SCSI_OSD_ULD
+	select ORE
 	default m
 
 config ROOT_NFS


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Problems with Kconfig select across directories
  2011-10-14 22:27   ` Boaz Harrosh
@ 2011-10-14 22:45     ` Michal Marek
  2011-10-14 22:54       ` Boaz Harrosh
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Marek @ 2011-10-14 22:45 UTC (permalink / raw)
  To: Boaz Harrosh; +Cc: Paul Bolle, Trond Myklebust, linux-kernel, NFS list

On 15.10.2011 00:27, Boaz Harrosh wrote:
> On 10/15/2011 12:03 AM, Michal Marek wrote:
>> On 14.10.2011 16:35, Boaz Harrosh wrote:
>>> This does not work. The ORE is not compiled and MODPOST complains.
>>> (Given EXOFS_FS is not selected since then it will work)
>>
>> fs/Makefile only visits fs/exofs if CONFIG_EXOFS_FS is set.
> 
> Bingo. Right on the money. With below patch it works. I'll think
> about it some more and submit.
> 
> Thanks
> ---
> exofs/ore: Select fs/exofs/ folder in Makefile also for ORE only compilation
> 
> If any thing from fs/exofs is set the ORE will be selected. So conditionally
> include fs/exofs in fs/Makefile on ORE set and not EXOFS_FS
...
> --- a/fs/Makefile
> +++ b/fs/Makefile
> @@ -120,6 +120,6 @@ obj-$(CONFIG_DEBUG_FS)		+= debugfs/
>  obj-$(CONFIG_OCFS2_FS)		+= ocfs2/
>  obj-$(CONFIG_BTRFS_FS)		+= btrfs/
>  obj-$(CONFIG_GFS2_FS)           += gfs2/
> -obj-$(CONFIG_EXOFS_FS)          += exofs/
> +obj-$(CONFIG_ORE)		+= exofs/

Note that changing it to obj-y is also valid. And perhaps more obvious.

Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with Kconfig select across directories
  2011-10-14 22:45     ` Michal Marek
@ 2011-10-14 22:54       ` Boaz Harrosh
  0 siblings, 0 replies; 6+ messages in thread
From: Boaz Harrosh @ 2011-10-14 22:54 UTC (permalink / raw)
  To: Michal Marek; +Cc: Paul Bolle, Trond Myklebust, linux-kernel, NFS list

On 10/15/2011 12:45 AM, Michal Marek wrote:
> On 15.10.2011 00:27, Boaz Harrosh wrote:
>> On 10/15/2011 12:03 AM, Michal Marek wrote:
>>> On 14.10.2011 16:35, Boaz Harrosh wrote:
>>>> This does not work. The ORE is not compiled and MODPOST complains.
>>>> (Given EXOFS_FS is not selected since then it will work)
>>>
>>> fs/Makefile only visits fs/exofs if CONFIG_EXOFS_FS is set.
>>
>> Bingo. Right on the money. With below patch it works. I'll think
>> about it some more and submit.
>>
>> Thanks
>> ---
>> exofs/ore: Select fs/exofs/ folder in Makefile also for ORE only compilation
>>
>> If any thing from fs/exofs is set the ORE will be selected. So conditionally
>> include fs/exofs in fs/Makefile on ORE set and not EXOFS_FS
> ...
>> --- a/fs/Makefile
>> +++ b/fs/Makefile
>> @@ -120,6 +120,6 @@ obj-$(CONFIG_DEBUG_FS)		+= debugfs/
>>  obj-$(CONFIG_OCFS2_FS)		+= ocfs2/
>>  obj-$(CONFIG_BTRFS_FS)		+= btrfs/
>>  obj-$(CONFIG_GFS2_FS)           += gfs2/
>> -obj-$(CONFIG_EXOFS_FS)          += exofs/
>> +obj-$(CONFIG_ORE)		+= exofs/
> 
> Note that changing it to obj-y is also valid. And perhaps more obvious.
> 
> Michal

Thanks. You read my thoughts. The naming would be off with my change.
I'll take your advise and send a patch to Al on Monday.

Cheers
Boaz

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-14 23:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-14 14:35 Problems with Kconfig select across directories Boaz Harrosh
2011-10-14 21:34 ` Paul Bolle
2011-10-14 22:03 ` Michal Marek
2011-10-14 22:27   ` Boaz Harrosh
2011-10-14 22:45     ` Michal Marek
2011-10-14 22:54       ` Boaz Harrosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox