Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Mar 1995 01:20:41 +0000 ()
From:      Brian Tao <taob@gate.sinica.edu.tw>
To:        Remy.Card@masi.ibp.fr
Cc:        hackers@FreeBSD.org
Subject:   Re: Filesystem clean flag
Message-ID:  <Pine.BSI.3.91.950320011128.2057D-100000@aries.ibms.sinica.edu.tw>
In-Reply-To: <199503191658.QAA00122@bbj.ibp.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.91.950320011128.2057D-100000>