[NFS] mount.nfs kernel version check override

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--- 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();
------------------------------------------------------------------------------
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
_______________________________________________
NFS maillist  -  NFS@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that nfs@xxxxxxxxxxxxxxxxxxxxx is being discontinued.
Please subscribe to linux-nfs@xxxxxxxxxxxxxxx instead.
    http://vger.kernel.org/vger-lists.html#linux-nfs

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux