Re: Floppy handling

From: Helge Hafting (helgehaf@idb.hist.no)
Date: Thu Jun 15 2000 - 02:33:19 EST


>
>
> You all are being silly.
> Copying the whole disk is painfully slow.
> And i've heard of automounters that check the drive every x secs to see if
> there's a disk in it.
>
> First things first, we shouldn't give a fsck if the user puts in a disk or
> not, atleast not when he puts it in.
> When we care is when he tries to access the mount point, then we check for a
> disk and mount if there is one.

Good. So we need a special kind of mount, that postpone the reading of
the superblock etc. until some process tries to access the fs.

> Polling the disk every x secs is just stupid, we have no need to mount until
> he tries to access it anyway.
Agreed.
>
> The only good way to handle removed it is like the macitoshes do, make you
> click a button or type a command to eject it.

Keep the light on as long as there are outstanding requests. When there
are
none, wait a little and if nothing happens sync the floppy and turn off
the light. No fs damage if the user removes it at that point.

At the next access, verify that it is the same floppy. If not, remount
it
(and invalidate any open file handles for the old floppy. There will
usually be none.)

If this is somehow hard to do, keep the light on as long as
the fs is busy, and auto-umount after a timeout when it
isn't.

Helge Hafting

-
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 : Thu Jun 15 2000 - 21:00:34 EST