Skip site navigation (1)Skip section navigation (2)
Date:      26 Jan 2001 01:16:44 +0100
From:      Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
To:        Eric Werme USG <werme@wasted.zk3.dec.com>
Cc:        Mike Smith <msmith@freebsd.org>, Linux NFS mailing list <nfs@lists.sourceforge.net>, FreeBSD Stable <freebsd-stable@freebsd.org>, Guy Harris <gharris@flashcom.net>
Subject:   Resolved: Incompatible: FreeBSD 4.2 client, Linux 2.2.18 nfsv3 server, read-only export
Message-ID:  <m3d7dbdv6b.fsf@emma1.emma.line.org>
In-Reply-To: <200101252040.PAA0000803167@anw.zk3.dec.com>
References:  <200101252040.PAA0000803167@anw.zk3.dec.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Eric Werme USG <werme@wasted.zk3.dec.com> writes:

> Umm, either I'm reading your post wrong, or you've glitched on your
> recall of the protocol.
> 
> If status == NFS3ERR_ROFS, then you get ACCESS3resfail which does not
> have the bit mask that is only returned as part of ACCESS3resok.

Evident when using a good packet dissector like ethereal. :*)
 
> Folks, I think we've beaten this dead molehill into a mountain.
> What's going to happen when someone finds a big problem?

Message flood without hope to escape the Big Chaos[tm].


Seriously, Neil Brown has posted a really short (3 line) patch to the
linux-kernel mailing list which does the expected job: fix the server
problem. I'm using it and my FreeBSD 4.2 client and Linux 2.2.18 server
happily chat to each other "in NFSv3".

As a reference and for the records and archives, I'm attaching the patch
(against vanilla 2.2.18 Linux) that Neil Brown sent to the linux-kernel
mailing list.

Thanks for all helpful mails and tracking and tracing. Thanks to Neil
for fixing things.

Again, Neil's patch is against a stock kernel.org Linux 2.2.18 tree. To
apply in /usr/src/linux with patch -p0. 

Matthias Andree



Neil's patch to follow, headers mutilated and quotes and attribution of
the body stripped (already there):

From: Neil Brown <neilb@cse.unsw.edu.au>
To: Matthias Andree <matthias.andree@stud.uni-dortmund.de>
Date: Wed, 24 Jan 2001 17:06:55 +1100 (EST)
Message-ID: <14958.28927.756597.940445@notabene.cse.unsw.edu.au>
Cc: Linux NFS mailing list <nfs@lists.sourceforge.net>,
	Linux-Kernel mailing list <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [NFS] Linux 2.2.18 nfs v3 server bug (was: Incompatible: FreeBSD 4.2 client, Linux 2.2.18 nfsv3 server, read-only export)
References: <20010123015612.H345@quadrajet.flashcom.com>
	<20010123162930.B5443@emma1.emma.line.org>
	<wuofwynsj5.fsf_-_@bg.sics.se>
	<20010123105350.B344@quadrajet.flashcom.com>
	<20010124041437.A28212@emma1.emma.line.org>

[...]

I stuffed up when I tried to interpret the error, but after much
sensible correction, here is a patch.  Please try it, and suggest any
other errs that should be tested for (or maybe we should invert the
sense of the test, and test for error codes that ACCESS is allowed to
return.
2.4.0 seems to get it right.

NeilBrown

--- ./fs/nfsd/vfs.c	2001/01/10 05:03:28	1.11
+++ ./fs/nfsd/vfs.c	2001/01/24 06:02:01
@@ -448,7 +448,9 @@
 			error = nfsd_permission(export, dentry, (map->how | NO_OWNER_OVERRIDE));
 			if (error == 0)
 				result |= map->access;
-			else if ((error == nfserr_perm) || (error == nfserr_acces)) {
+			else if ((error == nfserr_perm) ||
+				 (error == nfserr_acces) ||
+				 (error == nfserr_rofs)) {
 				/*
 				 *  This access type is denyed; but the 
 				 *  access query itself succeeds.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m3d7dbdv6b.fsf>