linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfs: Define nfs4 module alias
@ 2011-11-28 17:58 Stefan Bader
  2011-11-28 18:43 ` Trond Myklebust
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Bader @ 2011-11-28 17:58 UTC (permalink / raw)
  To: linux-nfs; +Cc: Trond.Myklebust, smb

The fact that mount.nfs4 does not find the correct modules to load
(as fs type is nfs4 and that gets probed) seems to be a common
pitfall for quite a bit of time now.
It seems like adding an alias for the nfs4 filesystem type would
be a simple and acceptable (at least ext4 conditionally seems to
do the same) way to fix this. I placed the code into the one file
that already had some module stuff in it.
Does this look like an acceptable change?

-Stefan


>From 1351324afb76bc831eb70f0af3f7a9524047cec0 Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader@canonical.com>
Date: Mon, 28 Nov 2011 15:37:39 +0100
Subject: [PATCH] nfs: Define nfs4 module alias

When NFSv4 is set to be built, the supporting code gets built into the
nfs module. But when trying to mount with fs-type nfs4 the default is
to try to load a module with the same name. Define a module alias to
enable automatic module loading for NFSv4.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 fs/nfs/inode.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index c07a55a..608069a 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1653,6 +1653,9 @@ static void __exit exit_nfs_fs(void)
 MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>");
 MODULE_LICENSE("GPL");
 module_param(enable_ino64, bool, 0644);
+#ifdef CONFIG_NFS_V4
+MODULE_ALIAS("nfs4");
+#endif
 
 module_init(init_nfs_fs)
 module_exit(exit_nfs_fs)
-- 
1.7.5.4


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

* Re: [PATCH] nfs: Define nfs4 module alias
  2011-11-28 17:58 [PATCH] nfs: Define nfs4 module alias Stefan Bader
@ 2011-11-28 18:43 ` Trond Myklebust
  0 siblings, 0 replies; 2+ messages in thread
From: Trond Myklebust @ 2011-11-28 18:43 UTC (permalink / raw)
  To: Stefan Bader; +Cc: linux-nfs, smb

On Mon, 2011-11-28 at 18:58 +0100, Stefan Bader wrote: 
> The fact that mount.nfs4 does not find the correct modules to load
> (as fs type is nfs4 and that gets probed) seems to be a common
> pitfall for quite a bit of time now.
> It seems like adding an alias for the nfs4 filesystem type would
> be a simple and acceptable (at least ext4 conditionally seems to
> do the same) way to fix this. I placed the code into the one file
> that already had some module stuff in it.
> Does this look like an acceptable change?

We should really be encouraging people to use mount.nfs rather than
mount.nfs4 these days. The former will automatically load the right
module...

Cheers
  Trond

-- 
Trond Myklebust
Linux NFS client maintainer

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


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

end of thread, other threads:[~2011-11-28 18:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-28 17:58 [PATCH] nfs: Define nfs4 module alias Stefan Bader
2011-11-28 18:43 ` Trond Myklebust

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).