Re: Of removable devices

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Wed Feb 16 2000 - 15:38:03 EST


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

ST> On Wed, 16 Feb 2000 09:45:10 -0500, "Theodore Y. Ts'o" <tytso@MIT.EDU>
ST> said:

>> First, sorry for yelling earlier. I'm conscious of problems with PC
>> floppies. Calling block_fsync() regulary is not even a solution, I'm
>> aware of this as well - too much overhead for not so much. But a
>> newbie is not as stupid to eject a floppy when he sees the LED is on
>> (well, at least I hope so :)

>> Right. That was the basic design behind supermount, as I understand
>> it. Users have been well programmed that if the LED light is off, it's
>> safe to pop the disk out. Because Linux normally has different rules,
>> this violates the principal of least surprise.

ST> Exactly. The two things supermount was designed to ensure were:

ST> 1) All blocks are flushed to disk and the filesystem remounted readonly
ST> as soon as there are no more files open for write on the medium; and

ST> 2) supermount "overlays" its own directories on top of the directory
ST> inodes owned by the underlying filesystem, so that even if you have
ST> "cd"ed to a supermounted filesystem, you can still safely remove the
ST> medium.

>> So the question is whether it's possible to do something relatively
>> painless which allows the right thing to happen under most
>> circumstances.

ST> These two things appear to be the Right Thing as far as naive users are
ST> concerned. The real problem is how to do it cleanly.

If "naive user" == "windows user" then said user EXPECT to see pop-up window
if disk was removed to fast. Typical Windows user sees BSOD with request to
put "right disk" back in CD/floppy driver so often that ANY other behaviour
will be surprise to him. If you want "least surprise scheme" you should
implement scheme complete with pop-up boxes (Windows9X BSOD can be replaced
with nice Windows NT-style dialog :-) or not implement it at all. Since ONLY
in such case user should not learn anything new: if you should learn something
then why not teach it to mount/umount disks manually; if users should be able
to use disks "just like in Windows" the whole scheme should be implemented.

>> By the way, ext2 has a serial number, so it *would* be possible to
>> make ext2 check the superblock parameter when it was informed that a
>> media change may have happened. So it's not just the FAT filesystem
>> that can do this.

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