Date: Fri, 19 Dec 1997 07:51:24 -0800 From: Cy Schubert - ITSD Open Systems Group <cschuber@uumail.gov.bc.ca> To: freebsd-hackers@freebsd.org Subject: Nullfs Problems Message-ID: <199712191552.HAA01050@cwsys.cwsent.com>
next in thread | raw e-mail | index | archive | help
I may have a solution for the nullfs, umapfs, and unionfs panics. The panics are caused by a divide by zero trap when bsize is zero. I've tested this against the ftp server problem posted a short while back. I've been testing this for a short while and since I am not a FreeBSD kernel hacker (my background was originally MVS kernel), I'd like to get some opinions about this before submitting a PR to implement this. --- 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; + err = VOP_BMAP(vp, reqblock, (struct vnode **) 0, &bn, after, before); if (err) Regards, Phone: (250)387-8437 Cy Schubert Fax: (250)387-5766 UNIX Support OV/VM: BCSC02(CSCHUBER) ITSD BITNET: CSCHUBER@BCSC02.BITNET Government of BC Internet: cschuber@uumail.gov.bc.ca Cy.Schubert@gems8.gov.bc.ca "Quit spooling around, JES do it."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712191552.HAA01050>