Linux-kernel mailing list archive 2000-07,: Re: Of removable devices

# Re: Of removable devices

Stephen C. Tweedie (sct@redhat.com)
Sat, 19 Feb 2000 11:44:12 +0000 (GMT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Thomas Pornin: "Re: Of removable devices"
- Previous message: Mike A. Harris: "Re: Userland encrypted filesystem that root cannot access."

Hi,

On Sat, 19 Feb 2000 14:03:55 +0300 (MSK), "Khimenko Victor"
<khim@sch57.msk.ru> said:

ST> On Wed, 16 Feb 2000 23:29:17 +0300 (MSK), "Khimenko Victor"
ST> <khim@sch57.msk.ru> said:
>>> this daemon open up dialog and wait for kernel to get message "Ok,
>>> floppy found, you can remove your dialog". Perhaps daemon can notify
>>> kernel as well when "Ok" in dialog clicked to try to search floppies
>>> in different floppy drives

ST> It's far more complexity than it is worth. The simple, obviously
ST> correct approach is just to fail filesystem operations with -EIO on
ST> media change until the media is remounted.

> No. Linux has bad habit to not flush data on disk when it's available.
> If you'll try to copy 1MiB file on floppy then typically few KiBs will
> be stored immideately, then for 10-15sec there will be no acess to
> floppy and then (when deamon will try to flush beffers) rest will be
> saved.

You are confusing two entirely different things.

First of all, there is the problem of making sure that data is on the
floppy as soon as possible so that it is safe to remove the disk.
Secondly, there is the problem about what to do if the user removes
the disk in the middle of IO.

Even when we are flushing everything to disk immediately, it is still
possible for the user to remove the disk, and it is what happens here
that I was talking about. You were suggesting that we need a daemon
to pop up and tell the user to reinsert the disk. That's far more
complexity than we need.

> It's perfectly possible (for novice user) to pull disk when only few KiBs
> will be in fact saved. AFAIK change behaviour of VFS to store data to disk
> as far as data is available AND guarantee that motor will be NEVER spin down
> if there are exist dirty buffers will be also not trivial.

Supermount already does this, so your entire argument is void. If you
are running supermount, it makes an absolute guarantee that a close()
of the last file open for write on the filesystem will cause all dirty
buffers to be flushed immediately _before_ the close() is allowed to
complete, and therefore before the user is told that the save
operation has finished. With supermount, if you write a new file to
the floppy the disk light goes on immediately while the full contents
are saved, and the disk is safe to eject as soon as the disk light
goes off.

> P.S. Do you REALLY think that anyone will use StarOffice for Linux
> instead of MS Office for Windows if StarOffice for Linux will be
> SIGNIFICALLY less reliable when used with floppies ? Windows works
> with floppies in "Amiga way" (more or less) so it's MUCH more
> reliable when used with floppies then supermount.

Sorry, you are simply wrong here. Supermount was initially written
for use in a cybercafe where random users off the street would come
in, save stuff and expect to be able to remove the disk immediately.
It worked.

--Stephen

-
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/

- Next message: Thomas Pornin: "Re: Of removable devices"
- Previous message: Mike A. Harris: "Re: Userland encrypted filesystem that root cannot access."