From owner-freebsd-stable Sun Jan 21 23:14:28 2001 Delivered-To: freebsd-stable@freebsd.org Received: from note.orchestra.cse.unsw.EDU.AU (note.orchestra.cse.unsw.EDU.AU [129.94.242.29]) by hub.freebsd.org (Postfix) with SMTP id ED27837B401 for ; Sun, 21 Jan 2001 23:14:06 -0800 (PST) Received: From notabene.cse.unsw.edu.au ([129.94.242.2] == beethoven.orchestra.cse.unsw.EDU.AU) (for ) (for ) (for ) (for ) By note With Smtp ; Mon, 22 Jan 2001 18:12:18 +1100 Received: from neilb by notabene.cse.unsw.edu.au with local (Exim 3.12 #1 (Debian)) id 14Kb9B-0002Wy-00; Mon, 22 Jan 2001 18:12:13 +1100 From: Neil Brown To: Matthias Andree Date: Mon, 22 Jan 2001 18:12:12 +1100 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14955.56652.919230.41950@notabene.cse.unsw.edu.au> Cc: Linux NFS mailing list , reiserfs-list@namesys.com, FreeBSD Stable Subject: Re: [NFS] Incompatible: FreeBSD 4.2 client, Linux 2.2.18 nfsv3 server, ReiserFS In-Reply-To: message from Matthias Andree on Saturday January 20 References: <20010120234024.A1771@emma1.emma.line.org> X-Mailer: VM 6.72 under Emacs 20.7.2 X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D I have troubles mounting a reiserfs (3.5.29) file system that is on a > Linux 2.2.18 nfsv3 server with a FreeBSD 4.2-STABLE client, I'm getting > bogus "read-only file system" errors even on just ls. > > If I mount the same system via NFS v2, everything goes smooth. > > If mount an ext2 file system from the same server on the same client, > everything goes smooth, regardless if using NFS v3 (default) or v2 > (mount_nfs -2). > > If I use a Solaris 7 or Linux client for mounting, everything goes > smooth. I'm not quite sure if it's a Linux or a FreeBSD bug, and if > Linux, if it's NFS-specific or reiserfs specific. > > There seem to be issues with NFS v3 serving reiserfs still. > > If you need further information (traced syscalls, more elicit network > dump), please let me know. > > > > Here's a tcpdump 3.5 excerpt, the first two lines still from mount, the other > ones from ls /mnt (not showing portmapper and mountd packets, there are > unspectacular): > > 23:22:29.528242 freebsd.526363636 > emma1.nfs: 144 access fh 0,1/2 003f (ttl 64, id 44190) > 23:22:29.528764 emma1.nfs > freebsd.526363636: reply ok 116 access ERROR: Read-only file system (ttl 64, id 12889) > 23:22:31.516945 freebsd.526363637 > emma1.nfs: 144 access fh 0,1/2 003f (ttl 64, id 44202) > 23:22:31.517484 emma1.nfs > freebsd.526363637: reply ok 116 access ERROR: Read-only file system (ttl 64, id 12907) > Beware of error messages reported by tcpdump... they are misleading. The error code in the tcp packet is an "NFS error code" which should not be confused with an "Unix-errno" error code, though there are sometimes similarities. tcpdump seems to assume that nfs error codes *are* unix error codes. So you can believe the "116" but not the "read-only file system". Interestingly, nfs does not have an error "116", so it looks like the NFS server is leaking unix errno codes into the protocol. The Linux error code "116" is "Stale NFS file handle" (expect for Sparc Linux, there it is "Interrupted syscall should be restarted"). So my guess is that the reiserfs code which tries to support nfsd (which may well involve some patches to knfsd) is having problems, and wants to return ESTALE, but returns it without converting to an NFS error code. However I'm having trouble guessing why it would affect FreeBSD clients, but not Solaris or Linux clients. Hope this is helpful to someone. NeilBrown To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message