public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [pnfs] module_init not called in RPM
       [not found] ` <4A27BEA5.8070905@panasas.com>
@ 2009-06-07  8:51   ` Benny Halevy
  2009-06-07  9:01     ` Benny Halevy
  0 siblings, 1 reply; 4+ messages in thread
From: Benny Halevy @ 2009-06-07  8:51 UTC (permalink / raw)
  To: Boaz Harrosh, Fred Isaman; +Cc: pnfs, NFS list

On Jun. 04, 2009, 15:31 +0300, Boaz Harrosh <bharrosh@panasas.com> wrote:
> On 06/04/2009 11:51 AM, Fred Isaman wrote:
>> People were having problems with the fedora RPMs, and investigation
>> shows that the problem is related to the fact that  CONFIG_NFS_FS is
>> set to "m" while CONFIG_PNFS_BLOCK is set to "y".  In this case the
>> driver never registers (via module_init) with the NFS code.  The
>> problem is fixed by setting CONFIG_PNFS_BLOCK to "m".
>>
>> Is there anyway (simple) way this could be expected to work?  Because
>> as is, my understanding is that the block-layout tries to register
>> with (the yet unloaded) NFS module, and once the NFS module is loaded,
>> the block-layout code is never called again.
>>
>> Steve, would it be possible in the meantime to change to "CONFIG_PNFS_BLOCK=m"?
>>
>> Benny, does the PANLAYOUT driver have the same problem?

I believe so. When I try to configure panlayout as 'y' rather than 'm'
it looks like it does not even link properly with neither the nfs module
nor the kernel.

>>
>> Fred
> 
> 
> Below little trick will default the layout driver to be the same as the CONFIG_NFS_FS
> that is if CONFIG_NFS_FS=y then CONFIG_PNFS_BLOCK will be y and so for =m.
> 
> config PNFS_OBJLAYOUT
> 	tristate "Provide a pNFS block client (EXPERIMENTAL)"
> 	depends on NFS_FS && PNFS
> 	help
> 	  Say M or Y here if you want your pNfs client to support the block protocol.
> 	  Note if CONFIG_NFS_FS==M then this must also be ==M.
> 
> User can select them apart manually but if CONFIG_NFS_FS changes then CONFIG_PNFS_BLOCK
> will automatically change also. Only by first changing CONFIG_NFS_FS then manually
> changing CONFIG_PNFS_BLOCK they can separate. In which case the prompt should warn about
> CONFIG_NFS_FS=m CONFIG_PNFS_BLOCK=y does not work.
> (Experiment with this in make xconfig and see)
> 
> ---
> This works because Kconfig is not very recursive. the dependency chain figures out that
> CONFIG_PNFS_BLOCK is eventually dependent on CONFIG_NFS_FS, but the default value is taken
> from the direct parent which is CONFIG_PNFS, which is "bool", therefor the =Y default.
> Above though redundant for dependency will select the correct default value dependent
> on the NFS setting.
> 
> I'll send a patch upstream

Thanks!
Besides a short term work around I think we may want to rethink the way
layout drivers are being used...

Today the layout driver registers its layout type and it must be explicitly
loaded to do that, so you may need to manually modprobe it to get it to work.
Thereafter, the admin / user has no choice or control when to use on a
per-filesystem basis.  It's all or nothing.

I think that a more practical way would be to identify the layout driver
as a mount option and then dynamically discover and load it at mount time.
With this mechanism we can also have a default setting for this mount
option to be layout=auto, in which case, the nfs client will load predefined
layout drivers it knows about, based on the layout type attribute it sees
in run time.  layout=none will disable pnfs for this mount.

Benny

> Boaz
> 
> _______________________________________________
> pNFS mailing list
> pNFS@linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs

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

* Re: [pnfs] module_init not called in RPM
  2009-06-07  8:51   ` [pnfs] module_init not called in RPM Benny Halevy
@ 2009-06-07  9:01     ` Benny Halevy
  0 siblings, 0 replies; 4+ messages in thread
From: Benny Halevy @ 2009-06-07  9:01 UTC (permalink / raw)
  To: Boaz Harrosh, Fred Isaman; +Cc: NFS list, pnfs

On Jun. 07, 2009, 11:51 +0300, Benny Halevy <bhalevy@panasas.com> wrote:
> On Jun. 04, 2009, 15:31 +0300, Boaz Harrosh <bharrosh@panasas.com> wrote:
>> On 06/04/2009 11:51 AM, Fred Isaman wrote:
>>> People were having problems with the fedora RPMs, and investigation
>>> shows that the problem is related to the fact that  CONFIG_NFS_FS is
>>> set to "m" while CONFIG_PNFS_BLOCK is set to "y".  In this case the
>>> driver never registers (via module_init) with the NFS code.  The
>>> problem is fixed by setting CONFIG_PNFS_BLOCK to "m".
>>>
>>> Is there anyway (simple) way this could be expected to work?  Because
>>> as is, my understanding is that the block-layout tries to register
>>> with (the yet unloaded) NFS module, and once the NFS module is loaded,
>>> the block-layout code is never called again.
>>>
>>> Steve, would it be possible in the meantime to change to "CONFIG_PNFS_BLOCK=m"?
>>>
>>> Benny, does the PANLAYOUT driver have the same problem?
> 
> I believe so. When I try to configure panlayout as 'y' rather than 'm'
> it looks like it does not even link properly with neither the nfs module
> nor the kernel.

FWIW, When both CONFIG_NFS_FS and CONFIG_PNFS_PANLAYOUT are set to 'y'
it does get linked properly with the kernel...

Benny

> 
>>> Fred
>>
>> Below little trick will default the layout driver to be the same as the CONFIG_NFS_FS
>> that is if CONFIG_NFS_FS=y then CONFIG_PNFS_BLOCK will be y and so for =m.
>>
>> config PNFS_OBJLAYOUT
>> 	tristate "Provide a pNFS block client (EXPERIMENTAL)"
>> 	depends on NFS_FS && PNFS
>> 	help
>> 	  Say M or Y here if you want your pNfs client to support the block protocol.
>> 	  Note if CONFIG_NFS_FS==M then this must also be ==M.
>>
>> User can select them apart manually but if CONFIG_NFS_FS changes then CONFIG_PNFS_BLOCK
>> will automatically change also. Only by first changing CONFIG_NFS_FS then manually
>> changing CONFIG_PNFS_BLOCK they can separate. In which case the prompt should warn about
>> CONFIG_NFS_FS=m CONFIG_PNFS_BLOCK=y does not work.
>> (Experiment with this in make xconfig and see)
>>
>> ---
>> This works because Kconfig is not very recursive. the dependency chain figures out that
>> CONFIG_PNFS_BLOCK is eventually dependent on CONFIG_NFS_FS, but the default value is taken
>> from the direct parent which is CONFIG_PNFS, which is "bool", therefor the =Y default.
>> Above though redundant for dependency will select the correct default value dependent
>> on the NFS setting.
>>
>> I'll send a patch upstream
> 
> Thanks!
> Besides a short term work around I think we may want to rethink the way
> layout drivers are being used...
> 
> Today the layout driver registers its layout type and it must be explicitly
> loaded to do that, so you may need to manually modprobe it to get it to work.
> Thereafter, the admin / user has no choice or control when to use on a
> per-filesystem basis.  It's all or nothing.
> 
> I think that a more practical way would be to identify the layout driver
> as a mount option and then dynamically discover and load it at mount time.
> With this mechanism we can also have a default setting for this mount
> option to be layout=auto, in which case, the nfs client will load predefined
> layout drivers it knows about, based on the layout type attribute it sees
> in run time.  layout=none will disable pnfs for this mount.
> 
> Benny
> 
>> Boaz
>>
>> _______________________________________________
>> pNFS mailing list
>> pNFS@linux-nfs.org
>> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
> _______________________________________________
> pNFS mailing list
> pNFS@linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs

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

* [PATCH 1/2] SQUASHME: panlayout: fix CONFIG_PNFS_PANLAYOUT dependencies
       [not found] ` <b493f8670906040151w2e0fd2afpd8f645b0a5bfcbc4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-06-07 15:16   ` Benny Halevy
  2009-06-07 15:17   ` [PATCH 2/2] SQUASHME: pnfs-block: fix CONFIG_PNFS_BLOCK dependencies Benny Halevy
  1 sibling, 0 replies; 4+ messages in thread
From: Benny Halevy @ 2009-06-07 15:16 UTC (permalink / raw)
  To: Fred Isaman; +Cc: pnfs, linux-nfs, bharrosh, Benny Halevy

So that it will conform to CONFIG_NFS_FS's configuration.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index 514d2fb..b75fab6 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -95,9 +95,9 @@ config PNFS
 
 config PNFS_PANLAYOUT
 	tristate "Provide support for the Panasas OSD Layout Driver for NFSv4.1 pNFS (EXPERIMENTAL)"
-	depends on PNFS
+	depends on NFS_FS && PNFS
 	help
-	  Say M here if you want your pNFS client to support the Panasas OSD Layout Driver
+	  Say M or y here if you want your pNFS client to support the Panasas OSD Layout Driver.
 
 	  If unsure, say N.
 
-- 
1.6.3


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

* [PATCH 2/2] SQUASHME: pnfs-block: fix CONFIG_PNFS_BLOCK dependencies
       [not found] ` <b493f8670906040151w2e0fd2afpd8f645b0a5bfcbc4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-06-07 15:16   ` [PATCH 1/2] SQUASHME: panlayout: fix CONFIG_PNFS_PANLAYOUT dependencies Benny Halevy
@ 2009-06-07 15:17   ` Benny Halevy
  1 sibling, 0 replies; 4+ messages in thread
From: Benny Halevy @ 2009-06-07 15:17 UTC (permalink / raw)
  To: Fred Isaman; +Cc: pnfs, linux-nfs, bharrosh, Benny Halevy

So that it will conform to CONFIG_NFS_FS's configuration.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/Kconfig |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index b75fab6..beaf1a7 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -102,12 +102,12 @@ config PNFS_PANLAYOUT
 	  If unsure, say N.
 
 config PNFS_BLOCK
-       tristate "Provide a pNFS block client (EXPERIMENTAL)"
-       depends on PNFS
-       help
-         Say Y here if you want your pNfs client to support the block protocol
+	tristate "Provide a pNFS block client (EXPERIMENTAL)"
+	depends on NFS_FS && PNFS
+	help
+	  Say M or y here if you want your pNfs client to support the block protocol
 
-         If unsure, say N.
+	  If unsure, say N.
 
 config ROOT_NFS
 	bool "Root file system on NFS"
-- 
1.6.3


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

end of thread, other threads:[~2009-06-07 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <b493f8670906040151w2e0fd2afpd8f645b0a5bfcbc4@mail.gmail.com>
     [not found] ` <4A27BEA5.8070905@panasas.com>
2009-06-07  8:51   ` [pnfs] module_init not called in RPM Benny Halevy
2009-06-07  9:01     ` Benny Halevy
     [not found] ` <b493f8670906040151w2e0fd2afpd8f645b0a5bfcbc4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-06-07 15:16   ` [PATCH 1/2] SQUASHME: panlayout: fix CONFIG_PNFS_PANLAYOUT dependencies Benny Halevy
2009-06-07 15:17   ` [PATCH 2/2] SQUASHME: pnfs-block: fix CONFIG_PNFS_BLOCK dependencies Benny Halevy

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