Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Apr 1996 11:15:08 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        Eric.Berenguier@sycomore.fr (Eric Berenguier)
Cc:        questions@freebsd.com
Subject:   Re: "Clean flag is wrong" with fsck
Message-ID:  <199604091815.LAA05438@phaeton.artisoft.com>
In-Reply-To: <199604091311.PAA05612@sycgate.sycomore.fr> from "Eric Berenguier" at Apr 9, 96 03:11:50 pm

next in thread | previous in thread | raw e-mail | index | archive | help
>     when i use the command fsck i get the following message:
> 
> CLEAN FLAG IS WRONG IN SUPERBLOCK
> 
> the command i've typed in is:  fsck -n  
> and the filesystem is mounted.
> 
> What's the problem ? and how can i suppress this message (or it's cause)

When a file system is mounted for read/write it is marked dirty.

When it is unmounted, the last operation is to mark it clean.

This is how the system knows the difference between normal and
abnormal shutdowns.


The problem is that you are running fsck on a mounted file system
and expecting it to not complain.  8-).

You can "suppress the cause" by unmounting the file system before
running fsck.  8-) 8-) 8-).


Alternately, there are two sets of kernel patches you could apply
to the sync procedure.

The first set marks the FS clean after a sync and no dirty buffers
to be written exist after a certain amount of idle time (this is
what Windows95 does with VFAT as well).

Once these patches are integrated, it is safe to simply power the
system off after a certain amount of time inactive.


The second set is required to marke the FS dirty before allowing
a buffer referring to the FS to be marked dirty.  This causes some
delay for a system which has been idle for two sync periods (which
is when you would mark the FS clean -- sync periods should be
reduced to several seconds -- maybe even one -- by the first patch).


The patches are more useful for nomadic computing and removable
media than anything else.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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