From owner-freebsd-current Wed Mar 11 18:43:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA10142 for freebsd-current-outgoing; Wed, 11 Mar 1998 18:43:23 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from mhub2.tc.umn.edu (0@mhub2.tc.umn.edu [128.101.131.52]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id SAA10136 for ; Wed, 11 Mar 1998 18:43:21 -0800 (PST) (envelope-from adkin003@tc.umn.edu) Received: from pub-19-c-222.dialup.umn.edu by mhub2.tc.umn.edu; Wed, 11 Mar 98 20:43:06 -0600 Date: Wed, 11 Mar 1998 20:39:51 -0600 (CST) From: dave adkins X-Sender: adkin003@samthedog To: Michael Hancock cc: dave adkins , current@FreeBSD.ORG Subject: Re: ext2_sync and NULL inode and VNON v_type In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 12 Mar 1998, Michael Hancock wrote: > Date: Thu, 12 Mar 1998 10:02:58 +0900 (JST) > From: Michael Hancock > To: dave adkins > Cc: current@FreeBSD.ORG > Subject: Re: ext2_sync and NULL inode and VNON v_type > > You can just OR it into the check below it for a more canonical fix. > > if ((vp->v_type == VNON) || ((ip->i_flag & > > Make this patch and post it so some ext2 fs users can test it. > > Mike Hancock > > On Tue, 10 Mar 1998, dave adkins wrote: > > > In current as of 980310, a r/w mounted ext2 filesystem panics on the first > > sync. This happens when a vnode of type VNON with ip == NULL is processed. > > > > I have added a test for a v_type of VNON in ext2_sync(). > > > > if (VOP_ISLOCKED(vp)) > > continue; > > + if ( vp->v_type == VNON ) > > + continue; > > ip = VTOI(vp); > > if (ip == NULL) { > > > > > > I haven't yet tried writing to the mounted file system with this patch. > > > > dave adkins > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-current" in the body of the message > > > > -- > michaelh@cet.co.jp http://www.cet.co.jp > CET Inc., Daiichi Kasuya BLDG 8F, 2-5-12 Higashi Shinbashi, Minato-ku, > Tokyo 105 Japan Tel: +81-3-3437-1761 Fax: +81-3-3437-1766 > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > > Here's the patch to fix the ext2_sync() panic. --- ext2_vfsops.c.orig Mon Mar 9 08:46:57 1998 +++ ext2_vfsops.c Wed Mar 11 15:59:45 1998 @@ -857,7 +859,7 @@ continue; ip = VTOI(vp); - if ((ip->i_flag & - (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0 && - vp->v_dirtyblkhd.lh_first == NULL) + if ( (vp->v_type == VNON) || (ip->i_flag & + (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE) ) == 0 && + vp->v_dirtyblkhd.lh_first == NULL) continue; if (vget(vp, LK_EXCLUSIVE, p)) There do seem to be bigger problems with ext2fs. Writing a small file that (<17Kbytes) works if EXT2_PREALLOCATE is undefined. With preallocation defined, ext2fs writes generates alot of "Freeing blocks not in datazone" messages before crashing. Larger files even with preallocation undefined appear to write correctly and show the correct size but are unreadable. And require the use of debugfs on the linux side to clean up the filesystem. With either preallocation inodes, or files larger that can be held in the direct blocks, there are problems. I haven't used the ext2fs very often and remember having similar problems quite a while ago, I use it very infrequently, and them mostly for reading. I would recommend making it a readonly file system for now. I've been meaning to get rid of the linux entirely and get another 700 Mbytes back, but ... dave adkins To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message