Subject: AW: Clean bit bits
To: tech-kern@NetBSD.ORG <tech-kern@NetBSD.ORG>
From: Martin Husemann <martin@laurin.teuto.de>
List: tech-kern
Date: 01/18/1996 10:34:51
Waldi Ravens wrote:

> No problem. When newdosfs(8) sets the number of reserved sectors to 2 instead
> of the usual 1, the second reserved sector can be used to store timestamps and
> other usefull information (should of course be protected by a magic number
> and checksum).

That's right - but wouldn't you buy anything. You can't detect if the fs has been
mounted by DOS or Windows[*] in between. Actualy you can't trust your own
clean flag, which makes it useless. 

I don't see any real problem here. I have two ffs filesystems and two msdosfs
filesystems on one of my boxes and I realy don't care about the sane state of
the later when I boot NetBSD. There isn't anything important for that OS on that
partitions. If I would keep important things for NetBSD on msdosfs partitions,
I would like to have it checked at every boot.

This is a policy decision on a partition by partition base. It could be expressed by
a option in fstab "emulate clean bit = true" and a default "emulate clean bit = false"
or vice versa. The parsing of fstab would change anyhow, if we generalize fsck to
other filesystems.


Martin

[*] = It's a pitty: Windows 95 and Windows NT keep access time on FAT filesystems.
But they only store *the date*, and leave the time at 00:00:00. And they don't do it
for root directories (actualy I'm not sure they do it for directories at all). Anyway, you
could perform a short scan to find the newest access time and compare that against
the unmount time stored in the reserved sector. But +/- one day seems a bit
too much granularity and some people still boot old DOS versions, ignoring any
access times completely.