linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NFSv4: Add modalias for "nfs4"
@ 2012-04-27 13:10 Josh Boyer
  2012-04-27 13:30 ` Jeff Layton
  2012-04-27 14:19 ` Jim Rees
  0 siblings, 2 replies; 11+ messages in thread
From: Josh Boyer @ 2012-04-27 13:10 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-nfs, linux-kernel

When NFSv4 is configured, the support goes into the nfs.ko module.
However, nfs-utils seems to pass "nfs4" as the fileststem type for
NFSv4 mounts.  If the nfs module is not already loaded, the kernel
will eventually do a module request for "nfs4".  Apparently, this
has worked until now as the distributions ship a module config file
that manually aliases "nfs4" to "nfs".

There is really no need to do this, as the kernel can provide a
module alias internally for nfs4.  This adds that.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
---
 fs/nfs/nfs4proc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 60d5f4c..d6929c3 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6550,6 +6550,7 @@ const struct xattr_handler *nfs4_xattr_handlers[] = {
 module_param(max_session_slots, ushort, 0644);
 MODULE_PARM_DESC(max_session_slots, "Maximum number of outstanding NFSv4.1 "
 		"requests the client will negotiate");
+MODULE_ALIAS("nfs4");
 
 /*
  * Local variables:
-- 
1.7.10


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

* Re: [PATCH] NFSv4: Add modalias for "nfs4"
  2012-04-27 13:10 [PATCH] NFSv4: Add modalias for "nfs4" Josh Boyer
@ 2012-04-27 13:30 ` Jeff Layton
  2012-04-27 14:19 ` Jim Rees
  1 sibling, 0 replies; 11+ messages in thread
From: Jeff Layton @ 2012-04-27 13:30 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Trond Myklebust, linux-nfs, linux-kernel

On Fri, 27 Apr 2012 09:10:33 -0400
Josh Boyer <jwboyer@redhat.com> wrote:

> When NFSv4 is configured, the support goes into the nfs.ko module.
> However, nfs-utils seems to pass "nfs4" as the fileststem type for
> NFSv4 mounts.  If the nfs module is not already loaded, the kernel
> will eventually do a module request for "nfs4".  Apparently, this
> has worked until now as the distributions ship a module config file
> that manually aliases "nfs4" to "nfs".
> 
> There is really no need to do this, as the kernel can provide a
> module alias internally for nfs4.  This adds that.
> 
> Signed-off-by: Josh Boyer <jwboyer@redhat.com>
> ---
>  fs/nfs/nfs4proc.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 60d5f4c..d6929c3 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -6550,6 +6550,7 @@ const struct xattr_handler *nfs4_xattr_handlers[] = {
>  module_param(max_session_slots, ushort, 0644);
>  MODULE_PARM_DESC(max_session_slots, "Maximum number of outstanding NFSv4.1 "
>  		"requests the client will negotiate");
> +MODULE_ALIAS("nfs4");
>  
>  /*
>   * Local variables:

Looks reasonable to me.

Reviewed-by: Jeff Layton <jlayton@redhat.com>

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

* Re: [PATCH] NFSv4: Add modalias for "nfs4"
  2012-04-27 13:10 [PATCH] NFSv4: Add modalias for "nfs4" Josh Boyer
  2012-04-27 13:30 ` Jeff Layton
@ 2012-04-27 14:19 ` Jim Rees
  2012-04-27 14:48   ` Josh Boyer
  1 sibling, 1 reply; 11+ messages in thread
From: Jim Rees @ 2012-04-27 14:19 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Trond Myklebust, linux-nfs, linux-kernel

Josh Boyer wrote:

  When NFSv4 is configured, the support goes into the nfs.ko module.
  However, nfs-utils seems to pass "nfs4" as the fileststem type for
  NFSv4 mounts.

Weren't we going to change that to nfs and use nfsvers to select nfs4?

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

* Re: [PATCH] NFSv4: Add modalias for "nfs4"
  2012-04-27 14:19 ` Jim Rees
@ 2012-04-27 14:48   ` Josh Boyer
  2012-04-27 14:50     ` Myklebust, Trond
  0 siblings, 1 reply; 11+ messages in thread
From: Josh Boyer @ 2012-04-27 14:48 UTC (permalink / raw)
  To: Jim Rees; +Cc: Trond Myklebust, linux-nfs, linux-kernel

On Fri, Apr 27, 2012 at 10:19:18AM -0400, Jim Rees wrote:
> Josh Boyer wrote:
> 
>   When NFSv4 is configured, the support goes into the nfs.ko module.
>   However, nfs-utils seems to pass "nfs4" as the fileststem type for
>   NFSv4 mounts.
> 
> Weren't we going to change that to nfs and use nfsvers to select nfs4?

I have, approximately, no idea.  At least the version of nfs-utils found
in Fedora 17 and rawhide, it's still using "nfs4".   I believe that is
nfs-utils-1.2.6-rc6 based.

josh

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

* Re: [PATCH] NFSv4: Add modalias for "nfs4"
  2012-04-27 14:48   ` Josh Boyer
@ 2012-04-27 14:50     ` Myklebust, Trond
  2012-04-27 14:53       ` Josh Boyer
  0 siblings, 1 reply; 11+ messages in thread
From: Myklebust, Trond @ 2012-04-27 14:50 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Jim Rees, linux-nfs, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1005 bytes --]

On Fri, 2012-04-27 at 10:48 -0400, Josh Boyer wrote:
> On Fri, Apr 27, 2012 at 10:19:18AM -0400, Jim Rees wrote:
> > Josh Boyer wrote:
> > 
> >   When NFSv4 is configured, the support goes into the nfs.ko module.
> >   However, nfs-utils seems to pass "nfs4" as the fileststem type for
> >   NFSv4 mounts.
> > 
> > Weren't we going to change that to nfs and use nfsvers to select nfs4?
> 
> I have, approximately, no idea.  At least the version of nfs-utils found
> in Fedora 17 and rawhide, it's still using "nfs4".   I believe that is
> nfs-utils-1.2.6-rc6 based.

nfs4 is still _supported_ in Fedora 17, rawhide and upstream as a legacy
feature, but the recommended practice should be to mount -t nfs -overs=4
(or -overs=4.1).

Cheers
  Trond
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [PATCH] NFSv4: Add modalias for "nfs4"
  2012-04-27 14:50     ` Myklebust, Trond
@ 2012-04-27 14:53       ` Josh Boyer
  2012-04-27 15:02         ` Myklebust, Trond
  0 siblings, 1 reply; 11+ messages in thread
From: Josh Boyer @ 2012-04-27 14:53 UTC (permalink / raw)
  To: Myklebust, Trond; +Cc: Jim Rees, linux-nfs, linux-kernel

On Fri, Apr 27, 2012 at 02:50:28PM +0000, Myklebust, Trond wrote:
> On Fri, 2012-04-27 at 10:48 -0400, Josh Boyer wrote:
> > On Fri, Apr 27, 2012 at 10:19:18AM -0400, Jim Rees wrote:
> > > Josh Boyer wrote:
> > > 
> > >   When NFSv4 is configured, the support goes into the nfs.ko module.
> > >   However, nfs-utils seems to pass "nfs4" as the fileststem type for
> > >   NFSv4 mounts.
> > > 
> > > Weren't we going to change that to nfs and use nfsvers to select nfs4?
> > 
> > I have, approximately, no idea.  At least the version of nfs-utils found
> > in Fedora 17 and rawhide, it's still using "nfs4".   I believe that is
> > nfs-utils-1.2.6-rc6 based.
> 
> nfs4 is still _supported_ in Fedora 17, rawhide and upstream as a legacy
> feature, but the recommended practice should be to mount -t nfs -overs=4
> (or -overs=4.1).

OK.  So either this patch needs to go in, or something needs to add:

alias nfs4 nfs

to a conf file so modprobe picks it up.  I figured the kernel could add
the alias itself.  Is there a reason not to?

josh

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

* Re: [PATCH] NFSv4: Add modalias for "nfs4"
  2012-04-27 14:53       ` Josh Boyer
@ 2012-04-27 15:02         ` Myklebust, Trond
  2012-04-27 15:14           ` Josh Boyer
  2012-04-27 15:27           ` Jeff Layton
  0 siblings, 2 replies; 11+ messages in thread
From: Myklebust, Trond @ 2012-04-27 15:02 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Jim Rees, linux-nfs, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1490 bytes --]

On Fri, 2012-04-27 at 10:53 -0400, Josh Boyer wrote:
> On Fri, Apr 27, 2012 at 02:50:28PM +0000, Myklebust, Trond wrote:
> > On Fri, 2012-04-27 at 10:48 -0400, Josh Boyer wrote:
> > > On Fri, Apr 27, 2012 at 10:19:18AM -0400, Jim Rees wrote:
> > > > Josh Boyer wrote:
> > > > 
> > > >   When NFSv4 is configured, the support goes into the nfs.ko module.
> > > >   However, nfs-utils seems to pass "nfs4" as the fileststem type for
> > > >   NFSv4 mounts.
> > > > 
> > > > Weren't we going to change that to nfs and use nfsvers to select nfs4?
> > > 
> > > I have, approximately, no idea.  At least the version of nfs-utils found
> > > in Fedora 17 and rawhide, it's still using "nfs4".   I believe that is
> > > nfs-utils-1.2.6-rc6 based.
> > 
> > nfs4 is still _supported_ in Fedora 17, rawhide and upstream as a legacy
> > feature, but the recommended practice should be to mount -t nfs -overs=4
> > (or -overs=4.1).
> 
> OK.  So either this patch needs to go in, or something needs to add:
> 
> alias nfs4 nfs
> 
> to a conf file so modprobe picks it up.  I figured the kernel could add
> the alias itself.  Is there a reason not to?

Yes. This is a legacy feature that we want to encourage people to move
their systems off...

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [PATCH] NFSv4: Add modalias for "nfs4"
  2012-04-27 15:02         ` Myklebust, Trond
@ 2012-04-27 15:14           ` Josh Boyer
  2012-04-27 15:21             ` Myklebust, Trond
  2012-04-27 15:27           ` Jeff Layton
  1 sibling, 1 reply; 11+ messages in thread
From: Josh Boyer @ 2012-04-27 15:14 UTC (permalink / raw)
  To: Myklebust, Trond; +Cc: Jim Rees, linux-nfs, linux-kernel

On Fri, Apr 27, 2012 at 03:02:07PM +0000, Myklebust, Trond wrote:
> On Fri, 2012-04-27 at 10:53 -0400, Josh Boyer wrote:
> > On Fri, Apr 27, 2012 at 02:50:28PM +0000, Myklebust, Trond wrote:
> > > On Fri, 2012-04-27 at 10:48 -0400, Josh Boyer wrote:
> > > > On Fri, Apr 27, 2012 at 10:19:18AM -0400, Jim Rees wrote:
> > > > > Josh Boyer wrote:
> > > > > 
> > > > >   When NFSv4 is configured, the support goes into the nfs.ko module.
> > > > >   However, nfs-utils seems to pass "nfs4" as the fileststem type for
> > > > >   NFSv4 mounts.
> > > > > 
> > > > > Weren't we going to change that to nfs and use nfsvers to select nfs4?
> > > > 
> > > > I have, approximately, no idea.  At least the version of nfs-utils found
> > > > in Fedora 17 and rawhide, it's still using "nfs4".   I believe that is
> > > > nfs-utils-1.2.6-rc6 based.
> > > 
> > > nfs4 is still _supported_ in Fedora 17, rawhide and upstream as a legacy
> > > feature, but the recommended practice should be to mount -t nfs -overs=4
> > > (or -overs=4.1).
> > 
> > OK.  So either this patch needs to go in, or something needs to add:
> > 
> > alias nfs4 nfs
> > 
> > to a conf file so modprobe picks it up.  I figured the kernel could add
> > the alias itself.  Is there a reason not to?
> 
> Yes. This is a legacy feature that we want to encourage people to move
> their systems off...

So essentially what needs to happen is:

- Recent distros still ship the modalias in a conf file
- Upstream nfs-utils starts translating 'mount -t nfs4' into 'mount -t
  nfs -overs=4' in /sbin/mount.nfs4
- Upstream releases that
- Distros drop the alias.

Right?

josh

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

* Re: [PATCH] NFSv4: Add modalias for "nfs4"
  2012-04-27 15:14           ` Josh Boyer
@ 2012-04-27 15:21             ` Myklebust, Trond
  2012-04-27 15:41               ` Josh Boyer
  0 siblings, 1 reply; 11+ messages in thread
From: Myklebust, Trond @ 2012-04-27 15:21 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Jim Rees, linux-nfs, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2372 bytes --]

On Fri, 2012-04-27 at 11:14 -0400, Josh Boyer wrote:
> On Fri, Apr 27, 2012 at 03:02:07PM +0000, Myklebust, Trond wrote:
> > On Fri, 2012-04-27 at 10:53 -0400, Josh Boyer wrote:
> > > On Fri, Apr 27, 2012 at 02:50:28PM +0000, Myklebust, Trond wrote:
> > > > On Fri, 2012-04-27 at 10:48 -0400, Josh Boyer wrote:
> > > > > On Fri, Apr 27, 2012 at 10:19:18AM -0400, Jim Rees wrote:
> > > > > > Josh Boyer wrote:
> > > > > > 
> > > > > >   When NFSv4 is configured, the support goes into the nfs.ko module.
> > > > > >   However, nfs-utils seems to pass "nfs4" as the fileststem type for
> > > > > >   NFSv4 mounts.
> > > > > > 
> > > > > > Weren't we going to change that to nfs and use nfsvers to select nfs4?
> > > > > 
> > > > > I have, approximately, no idea.  At least the version of nfs-utils found
> > > > > in Fedora 17 and rawhide, it's still using "nfs4".   I believe that is
> > > > > nfs-utils-1.2.6-rc6 based.
> > > > 
> > > > nfs4 is still _supported_ in Fedora 17, rawhide and upstream as a legacy
> > > > feature, but the recommended practice should be to mount -t nfs -overs=4
> > > > (or -overs=4.1).
> > > 
> > > OK.  So either this patch needs to go in, or something needs to add:
> > > 
> > > alias nfs4 nfs
> > > 
> > > to a conf file so modprobe picks it up.  I figured the kernel could add
> > > the alias itself.  Is there a reason not to?
> > 
> > Yes. This is a legacy feature that we want to encourage people to move
> > their systems off...
> 
> So essentially what needs to happen is:
> 
> - Recent distros still ship the modalias in a conf file
> - Upstream nfs-utils starts translating 'mount -t nfs4' into 'mount -t
>   nfs -overs=4' in /sbin/mount.nfs4
> - Upstream releases that
> - Distros drop the alias.
> 
> Right?

No. Really all we need to do is add a printf() to /sbin/mount.nfs4 to
the effect that this is a legacy feature and that '-t nfs -overs=4' is
the recommended mount option. Perhaps the distros can also have their
distro upgrade utilities edit /etc/fstab to upgrade those automatically.

Then the distros can drop the alias whenever they think it is
appropriate.

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [PATCH] NFSv4: Add modalias for "nfs4"
  2012-04-27 15:02         ` Myklebust, Trond
  2012-04-27 15:14           ` Josh Boyer
@ 2012-04-27 15:27           ` Jeff Layton
  1 sibling, 0 replies; 11+ messages in thread
From: Jeff Layton @ 2012-04-27 15:27 UTC (permalink / raw)
  To: Myklebust, Trond; +Cc: Josh Boyer, Jim Rees, linux-nfs, linux-kernel

On Fri, 27 Apr 2012 15:02:07 +0000
"Myklebust, Trond" <Trond.Myklebust@netapp.com> wrote:

> On Fri, 2012-04-27 at 10:53 -0400, Josh Boyer wrote:
> > On Fri, Apr 27, 2012 at 02:50:28PM +0000, Myklebust, Trond wrote:
> > > On Fri, 2012-04-27 at 10:48 -0400, Josh Boyer wrote:
> > > > On Fri, Apr 27, 2012 at 10:19:18AM -0400, Jim Rees wrote:
> > > > > Josh Boyer wrote:
> > > > > 
> > > > >   When NFSv4 is configured, the support goes into the nfs.ko module.
> > > > >   However, nfs-utils seems to pass "nfs4" as the fileststem type for
> > > > >   NFSv4 mounts.
> > > > > 
> > > > > Weren't we going to change that to nfs and use nfsvers to select nfs4?
> > > > 
> > > > I have, approximately, no idea.  At least the version of nfs-utils found
> > > > in Fedora 17 and rawhide, it's still using "nfs4".   I believe that is
> > > > nfs-utils-1.2.6-rc6 based.
> > > 
> > > nfs4 is still _supported_ in Fedora 17, rawhide and upstream as a legacy
> > > feature, but the recommended practice should be to mount -t nfs -overs=4
> > > (or -overs=4.1).
> > 
> > OK.  So either this patch needs to go in, or something needs to add:
> > 
> > alias nfs4 nfs
> > 
> > to a conf file so modprobe picks it up.  I figured the kernel could add
> > the alias itself.  Is there a reason not to?
> 
> Yes. This is a legacy feature that we want to encourage people to move
> their systems off...
> 

Ahh ok...I guess I didn't get that memo. In that case, is there a plan
to deprecate the nfs4 fstype altogether?

Otherwise, you're going to end up with inconsistent behavior with "-t
nfs4", depending on whether nfs.ko is already plugged in at the time or
not.

-- 
Jeff Layton <jlayton@redhat.com>

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

* Re: [PATCH] NFSv4: Add modalias for "nfs4"
  2012-04-27 15:21             ` Myklebust, Trond
@ 2012-04-27 15:41               ` Josh Boyer
  0 siblings, 0 replies; 11+ messages in thread
From: Josh Boyer @ 2012-04-27 15:41 UTC (permalink / raw)
  To: Myklebust, Trond; +Cc: Jim Rees, linux-nfs, linux-kernel

On Fri, Apr 27, 2012 at 03:21:15PM +0000, Myklebust, Trond wrote:
> > > > OK.  So either this patch needs to go in, or something needs to add:
> > > > 
> > > > alias nfs4 nfs
> > > > 
> > > > to a conf file so modprobe picks it up.  I figured the kernel could add
> > > > the alias itself.  Is there a reason not to?
> > > 
> > > Yes. This is a legacy feature that we want to encourage people to move
> > > their systems off...
> > 
> > So essentially what needs to happen is:
> > 
> > - Recent distros still ship the modalias in a conf file
> > - Upstream nfs-utils starts translating 'mount -t nfs4' into 'mount -t
> >   nfs -overs=4' in /sbin/mount.nfs4
> > - Upstream releases that
> > - Distros drop the alias.
> > 
> > Right?
> 
> No. Really all we need to do is add a printf() to /sbin/mount.nfs4 to
> the effect that this is a legacy feature and that '-t nfs -overs=4' is
> the recommended mount option. Perhaps the distros can also have their
> distro upgrade utilities edit /etc/fstab to upgrade those automatically.
> 
> Then the distros can drop the alias whenever they think it is
> appropriate.

My limited experience shows that people won't change their habits until
those habits simply no longer work.  Adding a printf is probably a fine
thing to do, but I'm not sure it will have much impact on how people go
about mounting NFSv4 filesystems.  That leads me to believe that the
alias will be carried along for quite a while.

Anyway, the immediate problem can be solved by just keeping the alias in
a conf file.  If that's what is recommended for now, OK.

josh

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

end of thread, other threads:[~2012-04-27 15:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-27 13:10 [PATCH] NFSv4: Add modalias for "nfs4" Josh Boyer
2012-04-27 13:30 ` Jeff Layton
2012-04-27 14:19 ` Jim Rees
2012-04-27 14:48   ` Josh Boyer
2012-04-27 14:50     ` Myklebust, Trond
2012-04-27 14:53       ` Josh Boyer
2012-04-27 15:02         ` Myklebust, Trond
2012-04-27 15:14           ` Josh Boyer
2012-04-27 15:21             ` Myklebust, Trond
2012-04-27 15:41               ` Josh Boyer
2012-04-27 15:27           ` Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).