2004-01-05 10:50:30

by Herve Fache

[permalink] [raw]
Subject: Removing/ejecting and mount

I was reading someone's wish to support removal of media such as USB keys or CompactFlash cards at any time. I have the same wish. In fact, I thought it through a bit and I would like a bit more mount options. I could do with:
- almost-sync: allow for delay in writing (not as 'hard' as sync), but do not return until the data is actually safely written onto the medium
- nobusy: umount works (maybe with -f option?) even if the medium is 'busy'
- ephmerary: if the device is mounted rw from a user's point of view, it is not from a kernel point of view unless required by a write operation, and only for the duration of it

Why? Imagine the standard user:
- inserts medium (such as a compact flash card) - hotplug mounts it for him automatically and the WM opens a file manager window
- copies files to/from it - the medium is only in rw mode for the time of the writes (ephemerary option)
+ copy window disappears - we know it _IS_ done (almost-sync option) and we're now mounted ro
- removes compact flash card - hotplug needs to be able to 'clear' the mount, even if busy (nobusy option), and the WM can close any active window pointing to it
+ the medium is still 'clean'

Also, the nobusy option means I can always eject my CD, and that my CD can be handled the same way as described above...

Note that explaining users what mounting is about is very time consuming; such a solution would be greatly beneficial to my nerves...

I am open to comments, and pointers to where this can be implemented but please no flames!
Herv?.
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm