Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 1998 20:39:51 -0600 (CST)
From:      dave adkins <adkin003@tc.umn.edu>
To:        Michael Hancock <michaelh@cet.co.jp>
Cc:        dave adkins <adkin003@tc.umn.edu>, current@FreeBSD.ORG
Subject:   Re: ext2_sync and NULL inode and VNON v_type
Message-ID:  <Pine.NEB.3.96.980311201820.1037A-100000@samthedog>
In-Reply-To: <Pine.SV4.3.95.980312094638.6995B-100000@parkplace.cet.co.jp>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, 12 Mar 1998, Michael Hancock wrote:

> Date: Thu, 12 Mar 1998 10:02:58 +0900 (JST)
> From: Michael Hancock <michaelh@cet.co.jp>
> To: dave adkins <adkin003@tc.umn.edu>
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96.980311201820.1037A-100000>