Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Sep 2005 12:23:23 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        rwatson@FreeBSD.org
Cc:        freebsd-current@FreeBSD.org, obrien@FreeBSD.org, kris@obsecurity.org
Subject:   Re: [PANIC] ufs_dirbad: bad dir
Message-ID:  <200509271923.j8RJNNhF099503@gw.catspoiler.org>
In-Reply-To: <20050927155001.I34322@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 27 Sep, Robert Watson wrote:

> In the last week, on several occasions I've run into a situation where, 
> following a clean shutdown/reboot during a heavy build or tar operations, 
> the file system has come back up with minor corruption such that some 
> directory entries return EBADF, and fsck reports that the inodes were 
> partially cleared.  I've not yet reported it on a mailing list as I've 
> only seen it happen with a development kernel with extensive changes (our 
> audit development tree), and could be a property of those changes.  There 
> may or may not be a correlation to a case where the syncer gives up on 
> certain vnodes during the shutdown as a result of a reference leak of some 
> sort.  I'll keep an eye out for it happening on a stock kernel though.

I've seen the syncer thread shutdown timeout if I reboot immediately
after removing a large directory tree.  Tor Egge posted this patch to
ffs_softdep.c on Sunday which seems to fix this as a side effect.

Index: sys/ufs/ffs/ffs_softdep.c
===================================================================
RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_softdep.c,v
retrieving revision 1.184
diff -u -r1.184 ffs_softdep.c
--- sys/ufs/ffs/ffs_softdep.c	5 Sep 2005 22:14:33 -0000	1.184
+++ sys/ufs/ffs/ffs_softdep.c	24 Sep 2005 22:09:50 -0000
@@ -3477,6 +3477,8 @@
 	}
 	WORKLIST_INSERT(&inodedep->id_inowait, &dirrem->dm_list);
 	FREE_LOCK(&lk);
+	ip->i_flag |= IN_CHANGE;
+	ffs_update(vp, 0);
 	vput(vp);
 }




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509271923.j8RJNNhF099503>