Re: Floppy handling and removable media in general

From: Albert D. Cahalan (acahalan@cs.uml.edu)
Date: Sat Jun 17 2000 - 00:36:52 EST


Alexander Viro writes:
> On Sat, 17 Jun 2000, Albert D. Cahalan wrote:

>> The last thing to be done before turning off the floppy motor
>> should be marking the filesystem clean. The filesystems need
>
> It's a fscking bullshit and even you should know better -
> *driver* *has* *no* *business* *touching* *fs* *state*. Sheesh...

It is of course the filesystem driver that determines how to mark
the filesystem dirty. The media driver just asks to have this done,
or some middle layer runs the show. Whatever... there is no need
for the media driver to know what ext2 is.

The point is that, somehow, something should mark the fs clean.

Maybe it isn't easy to make callbacks of this sort, but without
them the removable media handling becomes a nasty mess of
arbitrary timeouts and usage rules. If a disk is pulled out when
it isn't being written to, users can expect to not need fsck.

>>> Uh? We may be writing metadata and current process may have
>>> nothing to the situation - it just happened to apply memory
>>> pressure and trigger icache flush.
>>
>> I think "flush" is indeed the right word here.
>
> OK, Albert, considering that it is you... Look: we have dirty inode.
> We start the icache flush. Buffer with relevant part of inode table is
> modified and marked dirty. It is sent to driver. At that point disk is
> taken away.

That is "flush" as in "go flush the toilet". Dispose of the data
by marking the buffer clean. Problem? Hey, nobody said it was OK
to pull out floppies with the light on.

Except for /etc/mtab problems and such, one might as well just
start the forced umount automatically at this point.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:14 EST