Linux NFS development
 help / color / mirror / Atom feed
From: David Greaves <david@dgreaves.com>
To: neilb@cse.unsw.edu.au
Cc: Ion Badulescu <ionut@badula.org>, Erez Zadok <ezk@cs.sunysb.edu>,
	am-utils@fsl.cs.sunysb.edu, nfs@lists.sourceforge.net
Subject: [PATCH] Makes nfs mount warning less frequent and more valuable
Date: Wed, 16 Mar 2005 15:06:01 +0000	[thread overview]
Message-ID: <42384B59.3060408@dgreaves.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0503151439250.22235@guppy.limebrokerage.com>

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

Neil,

This is in response to an ongoing quest to shut the kernel up when it 
whines:
   kernel: nfs warning: mount version older than kernel
incessantly and uselessly, I spoke to the am-utils people and eventually 
got some help tracking it down.

Googling around the error reveals many, many confused souls and no 
obvious reason for the message.

Ion Badulescu wrote:

> David,
>
> The basic answer is: don't worry about it, it's not harmful in any way.
>
> Until amd supports NFSv4, it will continue to cause the kernel to 
> print out this message. I've always questioned the usefulness of this 
> message, given that v2 and v3 clients (and mount programs) are fully 
> supported and will continue to be for the foreseeable future, but it 
> never bothered me enough to do something about it.

So is this the logic to produce a potentially useful warning?
patch is against 2.6.11

(This code is only executed at mount time so I assume the minor 
additional logic for a mere warning is acceptable)

It certainly makes life quieter with heavily automounted systems.


Signed-off-by: David Greaves <david@dgreaves.com>


[-- Attachment #2: inode.c.patch --]
[-- Type: text/plain, Size: 1052 bytes --]

--- fs/nfs/inode.c.orig	2005-03-15 16:12:07.000000000 +0000
+++ fs/nfs/inode.c	2005-03-16 13:42:13.000000000 +0000
@@ -1385,9 +1385,19 @@ static struct super_block *nfs_get_sb(st
 	/* Zero out the NFS state stuff */
 	init_nfsv4_state(server);
 
+	/* NFS v2 and v3 are interoperable and will continue to be so..
+	 * This should be reviewed when NFS_MOUNT_VERSION increments */
+	if ((data->version <2 ||
+	     data->version >6 ||
+	     NFS_MOUNT_VERSION < 2 ||
+	     NFS_MOUNT_VERSION > 6)
+	    && data->version != NFS_MOUNT_VERSION) {
+		printk("nfs warning: possibly dangerous mount version incompatibility: mount(v%d) %s than kernel(v%d)\n",
+		       data->version, data->version < NFS_MOUNT_VERSION ? "older" : "newer", NFS_MOUNT_VERSION);
+	}
+	
+	/* All <> values of NFS_MOUNT_VERSION 2..6 are handled */
 	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 < 2)
 			data->namlen = 0;
 		if (data->version < 3)

       reply	other threads:[~2005-03-16 15:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4237178A.5030003@dgreaves.com>
     [not found] ` <Pine.LNX.4.61.0503151439250.22235@guppy.limebrokerage.com>
2005-03-16 15:06   ` David Greaves [this message]
2005-03-16 22:48     ` [PATCH] Makes nfs mount warning less frequent and more valuable Neil Brown
2005-03-17 16:00     ` Trond Myklebust
2005-03-21 16:18       ` Ion Badulescu
2005-03-21 17:43         ` Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42384B59.3060408@dgreaves.com \
    --to=david@dgreaves.com \
    --cc=am-utils@fsl.cs.sunysb.edu \
    --cc=ezk@cs.sunysb.edu \
    --cc=ionut@badula.org \
    --cc=neilb@cse.unsw.edu.au \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox