Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 85982 - util-linux-2.12q & nfs_mount_version missmatch
Summary: util-linux-2.12q & nfs_mount_version missmatch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-20 01:15 UTC by Andrej Filipcic
Modified: 2007-08-16 23:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
nfs-mount.patch (nfs-mount.patch,1.31 KB, patch)
2005-08-04 21:24 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Filipcic 2005-03-20 01:15:02 UTC
util-linux-2.12q has maximum NFS_MOUNT_VERSION hardcoded to 4. Recent kernels (2.6.11) use version 6. This results in tons of annoying messages 
...
nfs warning: mount version older than kernel
...
when using autofs and/or using nfs mounts.

A simple patch attached below corrects it, but I am not sure whether it is safe to use it with older kernels (version 5?). Maybe one should look at fedora or suse patches, (fedora has a huge patch for nfsv4...)

diff -ur util-linux-2.12q/mount/nfs_mount4.h util-linux-2.12q.af/mount/nfs_mount4.h
--- util-linux-2.12q/mount/nfs_mount4.h 2000-10-14 16:20:51.000000000 +0200
+++ util-linux-2.12q.af/mount/nfs_mount4.h      2005-03-20 10:01:26.480058683 +0100
@@ -8,7 +8,7 @@
  * so it is easiest to ignore the kernel altogether (at compile time).
  */

-#define NFS_MOUNT_VERSION      4
+#define NFS_MOUNT_VERSION      6

 struct nfs2_fh {
         char                    data[32];
diff -ur util-linux-2.12q/mount/nfsmount.c util-linux-2.12q.af/mount/nfsmount.c
--- util-linux-2.12q/mount/nfsmount.c   2002-04-05 13:35:53.000000000 +0200
+++ util-linux-2.12q.af/mount/nfsmount.c        2005-03-20 10:01:39.937671638 +0100
@@ -120,7 +120,7 @@
             else if (kernel_version < MAKE_VERSION(2,3,99))
                  nfs_mount_version = 3;
             else
-                 nfs_mount_version = 4; /* since 2.3.99pre4 */
+                 nfs_mount_version = 6; /* since 2.3.99pre4 */
        }
        if (nfs_mount_version > NFS_MOUNT_VERSION)
             nfs_mount_version = NFS_MOUNT_VERSION;


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 SpanKY gentoo-dev 2005-08-04 21:24:44 UTC
Created attachment 65156 [details, diff]
nfs-mount.patch

patch is not safe as is ... by declaring your client supports version 6, the
kernel will assume the memory buffer you passed it is bigger than it actually
is

this patch should be safe though ... it's just useless because it doesnt
actually implement the additional features
Comment 2 SpanKY gentoo-dev 2007-08-16 23:35:32 UTC
with latest userspace utilities, this is fixed