From owner-cvs-sys Fri Jun 27 13:23:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA13265 for cvs-sys-outgoing; Fri, 27 Jun 1997 13:23:19 -0700 (PDT) Received: (from wpaul@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA13103; Fri, 27 Jun 1997 13:19:26 -0700 (PDT) From: Bill Paul Message-Id: <199706272019.NAA13103@hub.freebsd.org> Subject: Re: cvs commit: src/sys/nfs nfs_vfsops.c To: bde@zeta.org.au (Bruce Evans) Date: Fri, 27 Jun 1997 13:19:25 -0700 (PDT) Cc: cvs-all@freebsd.org, cvs-committers@freebsd.org, cvs-sys@freebsd.org In-Reply-To: <199706271947.FAA04210@godzilla.zeta.org.au> from "Bruce Evans" at Jun 28, 97 05:47:51 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-cvs-sys@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > > This is a bit kludgy in that nfsmout is a label defined by the nfsm_subs.h > > macros, but these macros are themselves more than a little kludgy. This > > stops the machine from crashing, but does not fix the overall bug: 'error' > > somehow becomes 5 (EIO) when a statfs() is performed on the locally mounted > > NFS filesystem. This seems to only happen the first time the filesystem > > is accesed: on subsequent accesses, it seems to work fine again. > > I think the following fixes the bogus errno. The mkfifo bug also caused > EIO instead of the correct errno. > > Bruce > > diff -c2 nfs_serv.c~ nfs_serv.c > *** nfs_serv.c~ Sun Jun 15 01:24:55 1997 > --- nfs_serv.c Sun Jun 15 01:25:14 1997 > *************** > *** 1668,1672 **** > } > nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft); > ! return (0); > nfsmout: > if (dirp) > --- 1669,1673 ---- > } > nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft); > ! return (error); > nfsmout: > if (dirp) > Nope; I just built a kernel with this change and it still does it. I added a printf() nfs_vfsops() so I would check the value of 'error': Jun 27 16:09:36 mbone /vmunix: ERROR: 0 Jun 27 16:09:46 mbone last message repeated 12 times Jun 27 16:09:46 mbone /vmunix: ERROR: 5 <--- first time 'df' is run Jun 27 16:09:57 mbone /vmunix: ERROR: 0 <--- second I was wondering how a change to nfsrv_mknod() was supposed to fix this since I never call mknod() on the filesystem. That said, nfsrv_statfs() in the nfs_serv.c module also does things like: if (v3) nfsm_srvpostop_attr(getret, &at); if (error) return (0); Shouldn't this be: if (error) return(error); Or am I missing something. -Bill -Bill