From owner-freebsd-hackers Sun Mar 19 09:27:59 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id JAA14154 for hackers-outgoing; Sun, 19 Mar 1995 09:27:59 -0800 Received: from aries.ibms.sinica.edu.tw ([140.109.40.248]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id JAA14142 for ; Sun, 19 Mar 1995 09:27:44 -0800 Received: (from taob@localhost) by aries.ibms.sinica.edu.tw (8.6.9/8.6.9) id BAA02121; Mon, 20 Mar 1995 01:20:43 GMT Date: Mon, 20 Mar 1995 01:20:41 +0000 () From: Brian Tao To: Remy.Card@masi.ibp.fr cc: hackers@FreeBSD.org Subject: Re: Filesystem clean flag In-Reply-To: <199503191658.QAA00122@bbj.ibp.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: hackers-owner@FreeBSD.org Precedence: bulk On Sun, 19 Mar 1995 Remy.Card@masi.ibp.fr wrote: > > I am currently studying the filesystem kernel code and I think that > the current clean flag implementation could be improved. Currently, the > clean flag is set to 0 when a filesystem is mounted in read-write mode and > set to 1 when the filesystem is unmounted. This way of doing things can be > a problem in some cases: suppose that a system crashes (so the filesystems > are marked as not clean), the system is rebooted in single user mode (so > fsck is not run at boot), and then goes to multiuser mode. When the system > is subsequently rebooted in a proper way, the clean flag is set to 1, and, > voila, the filesystems are marked as clean for the next boot but they can > contain errors. I ran into this a little while ago when the power here cut out for about five minutes (in the middle of a "tar -xvf" too, argh!). I brought it back up in single-user mode, but accidentally quit the shell before I could run a manual fsck. Of course, it skipped the filesystem checks and went on to boot into X, etc., etc. I shut the system down immediately, unmounted the filesystems and ran fsck. Clean flag was set, no errors were found. Hmmm. Does fsck really trust that clean flag? I hope not. Anyhow, I haven't found any evidence of filesystem corruption yet in the one week that passed since the power outage (knock on wood). -- Brian ("Though this be madness, yet there is method in't") Tao taob@gate.sinica.edu.tw <-- work ........ play --> taob@io.org