Date: Wed, 24 Jan 2001 10:42:16 -0800 From: Guy Harris <gharris@flashcom.net> To: Mike Smith <msmith@freebsd.org> Cc: Guy Harris <gharris@flashcom.net>, Matthias Andree <ma@dt.e-technik.uni-dortmund.de>, Linux NFS mailing list <nfs@lists.sourceforge.net>, FreeBSD Stable <freebsd-stable@freebsd.org> Subject: Re: [NFS] Incompatible: FreeBSD 4.2 client, Linux 2.2.18 nfsv3 server, read-only export Message-ID: <20010124104216.F344@quadrajet.flashcom.com> In-Reply-To: <200101241117.f0OBH7S10154@mass.dis.org>; from msmith@freebsd.org on Wed, Jan 24, 2001 at 03:17:07AM -0800 References: <200101241104.f0OB4sS10071@mass.dis.org> <200101241117.f0OBH7S10154@mass.dis.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010124104216.F344>