Re: Floppy handling

From: Manfred Spraul (manfred@colorfullife.com)
Date: Thu Jun 22 2000 - 16:30:13 EST


Jamie Lokier wrote:
>
> Manfred Spraul wrote:
> > I think we should...
>
> > * An automounter mounts and unmounts every few seconds [on floppies: 2
> > seconds without accesses].
>
> 2 seconds is too long.

2 seconds is the timeout for the automounter: the assumption is that you
won't be able to remove one disk and insert another disk in less than 2
seconds ;-)

> On other OSes (I'm talking about all the old
> micros), it's quite usual to rip a disk out of a drive the moment the
> light goes out, or even a bit sooner if you recognise that writing has
> finished and it's simply timing out the motor.

That's the filesystem part: all dirty data must be written before the
drive light goes out.

>
> Yes it does... And you can't rely on the serial number because some
> floppies (even MS-DOS ones) don't have one.

memcmp over the first 4 kB? Windows uses an fs specific callback "verify
disk".

> > but we should give the user a second chance if he has accidentially
> > removed a disk.
>
> For those of us who want 50k less kernel and 50k more free user space, I
> propose that the motor stays on until everything's written, writes are
> scheduled as soon as the disk is idle (or soon after), and a disk change
> unmounts the disk. :-)
>

What do you mean with "everything is written"?
The problem is not the filesystem metadata. We could use O_SYNC or
O_SYNC_METADATA. The problem is user space: what if the user forgot to
write a file? Revoke the file handles from the editor and tell the user
"please type the text again!"?
What if a database with a complex file structure is stored on the disk?

We should give the user a second chance.

--
	Manfred

- 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:24 EST