Skip to contentSkip to conversation

Mount version older than kernel: 4 vs. 6

DISCUSSION Frank Steiner 3 participants 5 messages Aug 4, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

using kernel 2.6.8rc3 and util-linux-2.12a, I ran into those "mount version older than kernel" messages, which were discussed here for the 2.6.4 kernel before. Patching inode.c, I can see that NFS_MOUNT_VERSION is 6, while data->version is 4. (The only mount at all that does not complain is the one done by nfsroot (of course) :-))

Just a stupid question: why does the nfsmount.h from the kernel source define NFS_MOUNT_VERSION 6? Shouldn't this number match the latest nfs version, i.e., 4? I've never heard of nfs v6 yet :-)
Or is the meaning of NFS_MOUNT_VERSION different?

Would it be safe to patch nfsmount.h and set the number to 4 for my own kernel to get rid of this warning, or could that break sth. else? It just fills my logs and I want to get rid of it...

cu,
Frank

Signature · 15 lines
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17           Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:   +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#1 lore raw
Quoted 4 lines · Frank Steiner

Just a stupid question: why does the nfsmount.h from the kernel source define NFS_MOUNT_VERSION 6? Shouldn't this number match the latest nfs version, i.e., 4? I've never heard of nfs v6 yet :-)
Or is the meaning of NFS_MOUNT_VERSION different?

That's the version of the NFS kernel mount struct, and is absolutely unrelated to the NFS version (except that both grow monotonically over time).

Quoted 3 lines

Would it be safe to patch nfsmount.h and set the number to 4 for my own kernel to get rid of this warning, or could that break sth. else? It just fills my logs and I want to get rid of it...

Our kernel has a patch to silence that warning for versions < 3. But I wouldn't mind if it was nixed entirely.

Olaf

Signature · 3 lines
Olaf Kirch     |  The Hardware Gods hate me.
[email protected]   |
---------------+ 

Bug #36841: Disable ``mount version is older than kernel'' warning:
The kernel for SL 9.1 will support a higher mount version than the mount binary.

Bug #37689: Some people still saw kernel messages complaining about the mount version. It seems this happens when the first mount attempt using kernel mount version 4 fails for some reason (for instance if the server doesn't support NFSv3) mount falls back to mount version 3.
So we should really warn about versions < 3 only. --okir

fs/nfs/inode.c +3 -2
Index: linux-2.6.4/fs/nfs/inode.c
===================================================================
@@ -1389,8 +1389,9 @@ static struct super_block *nfs_get_sb(st
 		memset(root->data+root->size, 0, sizeof(root->data)-root->size);
 
 	if (data->version != NFS_MOUNT_VERSION) {
-		printk("nfs warning: mount version %s than kernel\n",
-			data->version < NFS_MOUNT_VERSION ? "older" : "newer");
+		if (data->version < 3)
+			printk("nfs warning: mount version %d is older "
+			       "than 3\n", data->version);
 		if (data->version < 2)
 			data->namlen = 0;
 		if (data->version < 3)
#2 lore raw
Quoted 11 lines · Olaf Kirch
Quoted 4 lines · Frank Steiner

Just a stupid question: why does the nfsmount.h from the kernel source define NFS_MOUNT_VERSION 6? Shouldn't this number match the latest nfs version, i.e., 4? I've never heard of nfs v6 yet :-)
Or is the meaning of NFS_MOUNT_VERSION different?

That's the version of the NFS kernel mount struct, and is absolutely unrelated to the NFS version (except that both grow monotonically over time).

I see. But then it looks like a bug to me that the code in the inode.c is comparing the "NFS version" (4, in data->version) against the "NFS kernel mount struct" (6, in NFS_MOUNT_VERSION). That doesn't make sense, does it?

I added this to inode.c

        if (data->version != NFS_MOUNT_VERSION) {
                printk("nfs warning: mount version %s than kernel\n",
                        data->version < NFS_MOUNT_VERSION ? "older" : "newer");

+ printk("data version: %d\n",data->version);
+ printk("NFS_MOUNT_VERSION: %d\n",NFS_MOUNT_VERSION);

and got this result:

Aug  4 14:33:50 riemann kernel: nfs warning: mmmount version older than kernel
Aug  4 14:33:50 riemann kernel: data version: 4
Aug  4 14:33:50 riemann kernel: NFS_MOUNT_VERSION: 6

cu,
Frank

Signature · 15 lines
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17           Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:   +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#3 lore raw
Quoted 4 lines · Frank Steiner

I see. But then it looks like a bug to me that the code in the inode.c is comparing the "NFS version" (4, in data->version) against the "NFS kernel mount struct" (6, in NFS_MOUNT_VERSION). That doesn't make sense, does it?

data->version _is_ the API version. Your mount binary currently uses API version 4. The kernel supports up to API version 6 (which add NFSv4 support).

Olaf

Signature · 13 lines
Olaf Kirch     |  The Hardware Gods hate me.
[email protected]   |
---------------+ 


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#4 lore raw

P=E5 on , 04/08/2004 klokka 06:51, skreiv Olaf Kirch:

Quoted 9 lines · Frank Steiner
Quoted 4 lines

I see. But then it looks like a bug to me that the code in the inode.c is comparing the "NFS version" (4, in data->version) against the "NFS kernel mount struct" (6, in NFS_MOUNT_VERSION). That doesn't make sense, does it?

=20
data->version _is_ the API version. Your mount binary currently uses API version 4. The kernel supports up to API version 6 (which add NFSv4 support).

Nope. NFSv4 uses an entirely separate mount structure.

For the NFSv2/v3 mount structure, API version 5 adds RPCSEC_GSS the secure RPC model. API version 6 adds support for passing security context information down for use by LSM/SELinux/...

Cheers,
Trond

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs