Re: Of removable devices

From: Francis GALIEGUE (francis@mandrakesoft.com)
Date: Tue Feb 15 2000 - 09:34:07 EST


"Khimenko Victor" <khim@sch57.msk.ru> writes:

>
> > Like many other people, I strongly wish that removable device
> > management were easier under Linux.
>
> FOR WHO ?
>

<shout>USERS</shout>

> Dumb user ? Such user will eventually corrunt filesystem on floppy and will
> blame Linux for this (simpliest scenario: open file in MC viewer, then delete
> it from other MC window).

Then what? You can forcibly kill processes which access no more
existent files, if these files are on a removable media.

Moreover, this situation is not very different from
opening a file on disk and deleting it in another window. The only
difference is that it'd be killed if the media is gone.

> If you want to support only "smart floppies" (ZIP,
> MO, etc) you can do this with autofs. WHO will benefit from such patch anyway ?

No, you cannot do the following with autofs:

- insert a CDROM, floppy, whatever
- "click on the icon"
- remove the media
- insert another one
- "click refresh"

Yes, that's newbie stuff, and thus, all newbies would benefit from
this. Dumb users, if you wish. And they are by far the most numerous.

> Do we really need bad press about Linux ?
>

If well implemented, it needs no bad press, nor it needs press at all.

>
> The are exist solution for decent floppies: autofs. It works with decent
> floppies (NOT standard 3" & 5" floppies but ZIP, MO, etc) exactly like NT does,
> for example. Whatthe problem ?
>

See above.

>
> You missed one important thing: what to do with situation where system CAN
> NOT be correctly detached (that is floppy can not be easily ejected). One
> such situation is outlined above and it's just simples case ...
>

And it has a simple solution: a forcible kill. After all, it's the
users's fault in this case. You know which processes use a file, if
this file doesn't exist *and* the device is "sloppy-mounted" and not
here -> SIGKILL.

> P.S. I see only one problem with autofs: you can not eject disk when it's
> not actually used but merely opened in filemanager. IMO it can be arranged
> with changes in drivers, autofs & file managers so said window can be closed
> automagically on eject request.
>

It still does not answer my question of what misses in the kernel to
do that... Moreover your solution would require that the media report
media status change. There's AIN for CDROMs, but what for IDE floppies
and the like? Moreover, IDE floppies have no CDROM_LOCKDOOR ioctl
right now (I have a patch for that BTW).

-- 
fg

# rm *;o o: command not found

- 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 : Tue Feb 15 2000 - 21:00:29 EST