Re: Of removable devices

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Sat Feb 19 2000 - 07:18:52 EST


In <14510.33292.799393.851176@dukat.scot.redhat.com> Stephen C. Tweedie (sct@redhat.com) wrote:
ST> Hi,

ST> On Sat, 19 Feb 2000 14:03:55 +0300 (MSK), "Khimenko Victor"
ST> <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.

ST> You are confusing two entirely different things.

No exactly. The ultimate goal is to give user ability to use floppy
"as in Windows" and to have working filesystem if user doing everything
right.

ST> First of all, there is the problem of making sure that data is on the
ST> floppy as soon as possible so that it is safe to remove the disk.

If you want to prompt user to put floppy back toy should not make sure that
data is on the floppy as soon as possible.

ST> Secondly, there is the problem about what to do if the user removes
ST> the disk in the middle of IO.

Exactly. And if THAT problem is solved then first problem should not be solved
(you always can ask user to put floppy back).

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

Who are "we" ? "Need" for ? Etc.

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

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

What about mmap ? What about not last file (when you open file in MS Word
it'll create lock file near opened file and WILL NOT close that file till
windows with document is closed; do you still guarantee that "File"->"Save"
operation will be completed before LED is off?). Etc, etc.

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

ST> Sorry, you are simply wrong here.

No, I'm right. If we are talking about ALL EXISTING programs, and all types
of users of course.

ST> Supermount was initially written for use in a cybercafe where random
ST> users off the street would come in, save stuff and expect to be able to
ST> remove the disk immediately.

Do you really allow user to install any software he/she wants and use it ?

ST> It worked.

In VERY limited environment. Perhaps. If user with his/her floppy is gone
it's useless to ask he/she to put floppy back. So perhaps for cybercafe
supermount is right solution. This is NOT right solution for LOTS AND LOTS
of other places (especially where user can install software on his/her own).
So let supermount be what it is: limited solution for limited usage. That is:
separate patch, not part of kernel.

-
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 : Wed Feb 23 2000 - 21:00:23 EST