Date: Sun, 21 Dec 1997 09:50:01 -0800 (PST) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs Subject: Re: kern/5355: Fix for NULLFS problems Message-ID: <199712211750.JAA14594@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/5355; it has been noted by GNATS. From: Bruce Evans <bde@zeta.org.au> To: cschuber@uumail.gov.bc.ca, freebsd-gnats-submit@FreeBSD.ORG Cc: Subject: Re: kern/5355: Fix for NULLFS problems Date: Mon, 22 Dec 1997 04:41:45 +1100 >>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712211750.JAA14594>