All of lore.kernel.org
 help / color / mirror / Atom feed
* [NFS] mount.nfs kernel version check override
@ 2009-03-02 23:22 Jon Mason
  2009-03-03  0:02 ` Chuck Lever
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Mason @ 2009-03-02 23:22 UTC (permalink / raw)
  To: nfs; +Cc: swise, Jeffrey.C.Becker

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

I am working on backporting NFS-RDMA to older versions of Linux for the
Open Fabrics Linux kernel stack (OFED).  I have backported NFS-RDMA to
RHEL5.2 (which has a kernel based on 2.6.18), and others are working on
backporting to other older kernels.  The issue that I have and they will
discover is that there is a check in the mount command for kernels
greater than 2.6.22.  If it is older than this version, it will not pass
args to the kernel.

I have come up with a patch to add an additional flag to the mount
command to allow this kernel version check to be over-ruled.  Please
consider adding it to the next release of the nfs-utils.

Thanks,
Jon

[-- Attachment #2: nfs-utils-mount.patch --]
[-- Type: text/x-diff, Size: 1025 bytes --]

--- utils/mount/mount.c.orig	2008-10-17 09:20:09.000000000 -0500
+++ utils/mount/mount.c	2009-03-02 16:41:44.000000000 -0600
@@ -331,6 +331,7 @@ void mount_usage(void)
 	printf(_("\t-f\t\tFake mount, do not actually mount\n"));
 	printf(_("\t-n\t\tDo not update /etc/mtab\n"));
 	printf(_("\t-s\t\tTolerate sloppy mount options rather than fail\n"));
+	printf(_("\t-i\t\tIgnore kernel version limitations\n"));
 	printf(_("\t-h\t\tPrint this help\n"));
 	printf(_("\tnfsoptions\tRefer to mount.nfs(8) or nfs(5)\n\n"));
 }
@@ -475,7 +476,7 @@ int main(int argc, char *argv[])
 	mount_point = argv[2];
 
 	argv[2] = argv[0]; /* so that getopt error messages are correct */
-	while ((c = getopt_long(argc - 2, argv + 2, "rvVwfno:hs",
+	while ((c = getopt_long(argc - 2, argv + 2, "rvVwfno:hsi",
 				longopts, NULL)) != -1) {
 		switch (c) {
 		case 'r':
@@ -505,6 +506,9 @@ int main(int argc, char *argv[])
 		case 's':
 			++sloppy;
 			break;
+		case 'i':
+			string++;
+			break;
 		case 'h':
 		default:
 			mount_usage();

[-- Attachment #3: Type: text/plain, Size: 415 bytes --]

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H

[-- Attachment #4: Type: text/plain, Size: 362 bytes --]

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that nfs@lists.sourceforge.net is being discontinued.
Please subscribe to linux-nfs@vger.kernel.org instead.
    http://vger.kernel.org/vger-lists.html#linux-nfs

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

* Re: [NFS] mount.nfs kernel version check override
  2009-03-02 23:22 [NFS] mount.nfs kernel version check override Jon Mason
@ 2009-03-03  0:02 ` Chuck Lever
  0 siblings, 0 replies; 2+ messages in thread
From: Chuck Lever @ 2009-03-03  0:02 UTC (permalink / raw)
  To: Jon Mason; +Cc: Linux NFS Mailing List, swise, Jeffrey.C.Becker

Cc: corrected.

On Mar 2, 2009, at Mar 2, 2009, 6:22 PM, Jon Mason wrote:
> I am working on backporting NFS-RDMA to older versions of Linux for  
> the
> Open Fabrics Linux kernel stack (OFED).  I have backported NFS-RDMA to
> RHEL5.2 (which has a kernel based on 2.6.18), and others are working  
> on
> backporting to other older kernels.  The issue that I have and they  
> will
> discover is that there is a check in the mount command for kernels
> greater than 2.6.22.  If it is older than this version, it will not  
> pass
> args to the kernel.

That's because those older kernels don't support text-based mount  
options.  That will always be true of those upstream kernels.

> I have come up with a patch to add an additional flag to the mount
> command to allow this kernel version check to be over-ruled.  Please
> consider adding it to the next release of the nfs-utils.

I am not the maintainer of nfs-utils, however:  In general, features  
for backports like this are not considered for upstream.  They are  
usually your responsibility.  In this case, you would maintain your  
own copy of the mount command (or nfs-utils) that alters the kernel  
version check as needed.

Also, there used to be a "-i" switch that forced the mount.nfs command  
to send text-based mount options to the kernel.  The reason it was  
never taken upstream was because no-one issues the mount.nfs command  
directly: it's a subcommand that is executed by the mount command.  So  
there's no way to use it in /etc/fstab, for example.  Not very useful!

Finally, the usual practice is to place a proposed patch in the body  
of an e-mail rather than using an attachment when posting patches.   
Most people find that easier to manage with patch tools, and can use  
normal reply quoting when reviewing and commenting on the patch.

Thanks!

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com

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

end of thread, other threads:[~2009-03-03  0:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-02 23:22 [NFS] mount.nfs kernel version check override Jon Mason
2009-03-03  0:02 ` Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.