Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: usb flash drive removal (Re: Desktop NetBSD needs your help)
On Mon, Feb 09, 2009 at 11:57:01AM -0500, Arnaud Lacombe wrote:
> [assorted negativity about removable volumes]
I have one thing to say:
Bollocks.
Removable media weren't invented last year. There have been many
operating systems that supported removable media correctly, including
"real" OSes with VFS layers and write-back disk caching and the works.
Many of these systems date back 25 years or more.
None of them, however, are Unix-derived. It is a disgrace that
removable media handling in Unix has remained broken all this time.
This is what needs to be done:
(1) Automatically mounting media upon insertion creates a
configuration management problem. Where do you mount the new volume,
and how does this interact with existing config practices and
/etc/fstab? If someone who understands this problem (which apparently
excludes the freedesktop.org folks) can straighten it out, there's no
particular further difficulty with mounting.
(2) Unmounting on removal for devices that don't have a door lock or
some other mechanism to allow the OS to sync before ejecting requires
a method to send the user on the console a nastygram of the form
"REINSERT THAT AND WAIT FIVE SECONDS. OR ELSE." There is nothing
difficult about this except that it involves writing an X program,
although a more scalable solution requires a bit more integration with
desktop goo. The reason this hasn't happened yet is that, AFAICT, the
desktop folks don't understand what's required and the kernel folks
don't really care enough to bother, or fight with the desktop folks
over the color of the bikeshed^H^H^H^H^H^H^H^H^H window frame.
(3) Fixing the buffer cache code and whatever else is involved so it
doesn't choke when an unexpected eject occurs is, though not entirely
trivial, a SMOP.
(4) Fixing file system code so you can't panic or own the kernel by
inserting a corrupt volume is, though not trivial, also perfectly
straightforward.
All of this might have got done 12-14 years ago, too, except that
floppies disappeared just around the time a critical mass of people
started using Unix-derived OSes on machines that historically
supported floppy drives and where floppy drives were expected to work
properly.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index