From owner-freebsd-stable Wed Jan 24 10:47: 5 2001 Delivered-To: freebsd-stable@freebsd.org Received: from c014.sfo.cp.net (c014-h017.c014.sfo.cp.net [209.228.12.81]) by hub.freebsd.org (Postfix) with SMTP id 01BE337B698 for ; Wed, 24 Jan 2001 10:46:32 -0800 (PST) Received: (cpmta 25273 invoked from network); 24 Jan 2001 10:42:17 -0800 Received: from d8c81e5f.dsl.flashcom.net (HELO quadrajet.flashcom.com) (216.200.30.95) by smtp.flashcom.net (209.228.12.81) with SMTP; 24 Jan 2001 10:42:17 -0800 X-Sent: 24 Jan 2001 18:42:17 GMT Received: (from guy@localhost) by quadrajet.flashcom.com (8.9.3/8.9.3) id KAA00488; Wed, 24 Jan 2001 10:42:16 -0800 (PST) (envelope-from gharris) Date: Wed, 24 Jan 2001 10:42:16 -0800 From: Guy Harris To: Mike Smith Cc: Guy Harris , Matthias Andree , Linux NFS mailing list , FreeBSD Stable Subject: Re: [NFS] Incompatible: FreeBSD 4.2 client, Linux 2.2.18 nfsv3 server, read-only export Message-ID: <20010124104216.F344@quadrajet.flashcom.com> References: <200101241104.f0OB4sS10071@mass.dis.org> <200101241117.f0OBH7S10154@mass.dis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <200101241117.f0OBH7S10154@mass.dis.org>; from msmith@freebsd.org on Wed, Jan 24, 2001 at 03:17:07AM -0800 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Jan 24, 2001 at 03:17:07AM -0800, Mike Smith wrote: Content-Description: nfs_vnops.diff > --- /sys/nfs/nfs_vnops.c Fri Jan 12 14:15:00 2001 > +++ nfs_vnops.c Wed Jan 24 03:01:52 2001 > @@ -387,6 +387,14 @@ > */ > nfsstats.accesscache_misses++; > error = nfs3_access_otw(vp, wmode, ap->a_p,ap->a_cred); > + /* > + * Linux server may return EROFS despite this being > + * only an ACCESS rpc if we are asking about bits that > + * might allow us to write to the FS. The workaround > + * is to ignore EROFS as a return here. > + */ > + if (error == EROFS) > + error = 0; At least from looking at the Linux 2.2.18 code, if you get EROFS back from the Linux server, the actual set of access bits you get back won't have the right bits set; "nfsd_access()" just jumps to "out:" if it gets a "read-only file system" error, and that doesn't set "*access" to the result. If you do want to work around the Linux bug, you'd probably have to send another ACCESS request over the wire, with the write bits turned off; I'm not sure whether that's worth the effort or not. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message