Subject: Re: bin/1219: [dM] fsck is too aggressive about clean flags
To: None <netbsd-bugs@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: netbsd-bugs
Date: 07/13/1995 07:51:21
>> Hm, my reaction is to remark that if we're going to be resorting to
>> personal usage desires, when I tell fsck to check /dev/foo, I damn
>> well want it to check /dev/foo
> it's not a question of "personal taste," it's an interpretation of
> the meaning of the clean flag.

The reason I put in the bit about "personal usage desires" was your
remark
>>> there is every possibility (and, indeed, it's almost always the
>>> case when _i_ use fsck in this way)
which made it sound a little as if you thought "this is the way I want
it to work" were some touchstone of correctness.

To my mind, it's not so much a question of interpreting the clean flag
as doing what I tell it to.  To my mind, "fsck /dev/foo" means "check
/dev/foo", and if it doesn't check it, it's not doing what I told it.

> If there is going to be an option to fsck that determines whether or
> not a file system is to be checked in spite of the clean flag (and
> there must be), then it should be applied consistently.

This is the strongest justification for the current behavior, I think.
But I prefer programs to be useful first, and aesthetically clean and
orthogonal only to the extent that it doesn't interfere with their
utility.  Thus, in my opinion, this is weaker than the "do what I tell
you to, dammit" inconvenience of allowing the clean bit to suppress
checking of an explicitly named filesystem - which is whence PR 1219.

> In particular, as i've stated, the ability to make sure that file
> systems not in /etc/fstab are clean (w/o having to _always_
> completely fsck them) is very useful.  there's no way to do it, given
> what you think should happen if file systems are specified on the
> command line, unless one adds another flag.

As I remarked
>> people who want to skip clean filesystems can type ^C upon seeing
>> the "already clean" message.
I don't see what's so hard about this; it's not as if aborting an fsck
of a clean filesystem risks corrupting it.  (And you presumably don't
see what's so hard about using fsck -f...I'm neither trying nor
expecting to change your mind here, really.)

> it sounds to me like you want to put:
> 	alias fsck fsck -f
> in your .cshrc, or whatever, or something similar.

At the moment, perhaps, because I mistrust clean bits enough that I
want -f even with -p.  But if they get done right, then that alias is
too much, because then if I type fsck -p I don't get the not-if-clean
behavior.  As I think I may have remarked (I know I wrote the remark
but I'm not sure whether I edited it out before sending), a wrapper
program would be the proper fix for this...or the alternative I'm
choosing, to just put the patch in my private patch tree.  (I'd've
liked to get fsck out of that patch tree, but it's certainly not a big
issue to me.  I'm continuing this exchange only because I don't seem to
have gotten my position across clearly.)

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu