From owner-freebsd-fs@FreeBSD.ORG Tue May 2 20:32:36 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DEA716A404 for ; Tue, 2 May 2006 20:32:36 +0000 (UTC) (envelope-from freebsd-fs@merdin.com) Received: from smtp.mailix.net (smtp.mailix.net [216.148.213.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id D228243D49 for ; Tue, 2 May 2006 20:32:35 +0000 (GMT) (envelope-from freebsd-fs@merdin.com) Received: from [62.148.144.242] (helo=[62.148.144.242]) by smtp.mailix.net with asmtp (Exim 4.24-CA) id 1Fb1Xr-0001Gs-Ge for freebsd-fs@freebsd.org; Tue, 02 May 2006 13:32:31 -0700 Date: Wed, 3 May 2006 00:32:29 +0400 From: Pavel Merdine X-Mailer: The Bat! (v3.71.04) Professional X-Priority: 3 (Normal) Message-ID: <1541458526.20060503003229@merdin.com> To: Peter Holm In-Reply-To: <20060502193900.GA94069@peter.osted.lan> References: <20060502193900.GA94069@peter.osted.lan> MIME-Version: 1.0 X-SA-Exim-Mail-From: freebsd-fs@merdin.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 3.1 (built Thu Oct 23 13:26:47 PDT 2003) X-SA-Exim-Scanned: No; Unknown failure X-uvscan-result: clean (1Fb1Xr-0001Gs-Ge) Subject: Re: Stress testing the UFS2 filesystem X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 May 2006 20:32:36 -0000 Hello , Thank you for raising this problem again. I already tried to do that in that list, but received an answer that kernel is intended to do that. For example, you have a faulty disk. And you have a faulty sector which happened to occur on the directory place. So each time kernel reads this sector it panics. So it's initially hard to even understand what happens. And also it leads to corruption and lost files on other file system (each time). Imagine if you have 15 disks. In this case you have many files lost just because of a small (and not significant) fault. It's just a nonsense. Personally, I just replaced bad_dir with error return. By the way, there was some bug in fs in kernel that could lead to panic even on clean filesystem (bad_dir as far as I remember). It is very rare and it was fixed on DragonFly. As far as I remember a fix for this was also commited to current recently. I think that Linux is usually much smarter on this. By default it remounts a file system as read-only in case it detects a filesystem corruption. I would be very happy if FreeBSD could do the same, because fs panics really hurt when you have many systems with disks. Of course I think we could do patches to overcome corrupting panics, but the core FreeBSD team would not accept this, as they are happy with panics and corruptions they make to other filesystems. Tuesday, May 2, 2006, 11:39:00 PM, you wrote: > I had a chance to look some more at how the UFS2 filesystem code > handles a corrupt filesystem. I have made a web page describing the > tests and my findings: > http://people.freebsd.org/~pho/baddir.html > My daytime job will probably prevent me from looking further at > this any time soon, so if anyone finds this of interest I can make > the corrupted filesystems available. -- / Pavel Merdine