Date: Fri, 26 Dec 1997 01:35:10 -0500 (EST) From: "John S. Dyson" <dyson@FreeBSD.ORG> To: cschuber@uumail.gov.bc.ca Cc: freebsd-bugs@hub.freebsd.org Subject: Re: kern/5355: Fix for NULLFS problems Message-ID: <199712260635.BAA08052@dyson.iquest.net> In-Reply-To: <199712221840.KAA14709@hub.freebsd.org> from Cy Schubert - ITSD Open Systems Group at "Dec 22, 97 10:40:02 am"
next in thread | previous in thread | raw e-mail | index | archive | help
> > >>Fix:
> > >cwsys# cat /opt/archives-3/usermods/nullfs_panic_fix.usermod
> > >--- src/sys/vm/vnode_pager.c.orig2 Sun Dec 7 13:11:03 1997
> > >+++ src/sys/vm/vnode_pager.c Fri Dec 19 06:30:27 1997
> > >@@ -231,10 +231,12 @@
> > > blocksperpage = 0;
> > > if (pagesperblock > 0) {
> > > reqblock = pindex / pagesperblock;
> > >- } else {
> > >+ } else if (bsize > 0) {
> > > blocksperpage = (PAGE_SIZE / bsize);
> > > reqblock = pindex * blocksperpage;
> > >- }
> > >+ } else
> > >+ return FALSE;
> > >+
> >
> > I think bsize is supposed to be > 0 here. Lots of other places depend
> > on vp->v_mount->mnt_stat.f_iosize being reasonable. nullfs and some
> > other file systems (portal and umapfs at least) just don't initialize
> > most of mnt_stat (except by bzeroing it). This untested fix for nullfs
> > was obtained from union[fs].
> >
> > diff -c2 null_vfsops.c~ null_vfsops.c
> > *** null_vfsops.c~ Mon Oct 13 21:46:00 1997
> > --- null_vfsops.c Mon Dec 22 04:32:11 1997
> > ***************
> > *** 199,202 ****
> > --- 199,203 ----
> > &size);
> > bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
> > + (void)nullfs_statfs(mp, &mp->mnt_stat, p);
> > #ifdef NULLFS_DIAGNOSTIC
> > printf("nullfs_mount: lower %s, alias at %s\n",
> >
> > Bruce
>
I am the perpetrator of the f_iosize evil. Maybe we need to reevaluate
the design of this.
--
John | Never try to teach a pig to sing,
dyson@freebsd.org | it just makes you look stupid,
jdyson@nc.com | and it irritates the pig.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712260635.BAA08052>
