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.
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
with latest userspace utilities, this is fixed