Subject: Re: Clean bit bits
To: None <tech-kern@NetBSD.ORG>
From: Frank van der Linden <frank@fwi.uva.nl>
List: tech-kern
Date: 01/13/1996 00:39:25
Quoting der Mouse,

> [leave disk dirty if it was opened for writing]
> >> But the main question I have about this is: how does fsck get
> >> exempted from this?  It opens the device for writing, after all.
> > securelevel < 0 when fsck runs in /etc/rc.

> (I think it's ==0, but the difference doesn't matter for the moment.)

> So I take it then that your proposal is that opens for writing when
> securelevel<1 don't count?

> So after the machine comes up multi-user, I log in as root, fsck a
> filesystem, mount it, then when I unmount it it stays dirty?

Hmm.. this idea went straight from my brain to my keyboard I'm afraid.
You could get around the fsck problem by having a seperate operation
that marks a filesystem clean, but then you'd have the possibility
of having a process that messes up your filesystem and then marks
it clean by hand.

That's messy..

Perhaps storing the 'last checked' time is a good idea, when combined
with a flag to fsck that says 'if the filesystem has not been checked
since N timeunits, check it anyway'. That way everyone can express
his/her level of confidence in the number N (from 0 for always check
to not specifying the flag for relying on the clean bit).

- Frank