linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Bader <stefan.bader@canonical.com>
To: linux-nfs@vger.kernel.org
Cc: Trond.Myklebust@netapp.com, smb@canonical.com
Subject: [PATCH] nfs: Define nfs4 module alias
Date: Mon, 28 Nov 2011 18:58:58 +0100	[thread overview]
Message-ID: <1322503138-3613-1-git-send-email-stefan.bader@canonical.com> (raw)

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


             reply	other threads:[~2011-11-28 17:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-28 17:58 Stefan Bader [this message]
2011-11-28 18:43 ` [PATCH] nfs: Define nfs4 module alias Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322503138-3613-1-git-send-email-stefan.bader@canonical.com \
    --to=stefan.bader@canonical.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=smb@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).