Re: Of removable devices

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Tue Feb 15 2000 - 08:25:38 EST


In <m34sbazlwy.fsf@toy.mandrakesoft.com> Francis GALIEGUE (francis@mandrakesoft.com) wrote:

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

FOR WHO ?

> The supermount patch helped, but as previously mentioned on this list,
> it is not clean wrt VFS stuff.

What's more it'll do more harm then help. Who will use it ? Advanced users ?
Perhaps. But advanced users can create one-linear script, icon on desktop
(with KDE or GNOME even not-so-advanced user can do this :-), etc. No problem.
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). If you want to support only "smart floppies" (ZIP,
MO, etc) you can do this with autofs. WHO will benefit from such patch anyway ?
Do we really need bad press about Linux ?

> So, the problem remains to be solved.

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 ?

> To the (small) extent of my knowledge, putting this functionality into
> the kernel would require that:

> - each time a file is accessed on such a device, the VFS should verify
> whether the media hasn't changed upon us, and if so, invalidate the
> previous superblock, "load" the new one, and check whether the
> accessed file exists;
> - accessing a file on the device when there's no media should return
> -ENOENT and not -EIO, like supermount does;
> - prevent dentries preload for such a device

> And probably other things I've missed.

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

> What is missing right now in the 2.3.x series in order to create a new
> mount flag, say, MS_SLOPPYMOUNT, which would allow for a clean
> management of such peripherals?

Please describe what you mean by "clean management" and what's not clean
with autofs ?

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.

-
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