Re: Experimental patches to let magicdev control locking of CD-ROM



Hi

As a user I think that would be a great think ! But you still have to
remember that the problem also exists for floppies and USB storage
media. The problem is that floppies and USB storage media aren't
physically locked. That means that, even if they are still mounted, you
can remove them easily. But removing a floppy or a USB storage edia
while mounted can be dangerous.

So, my question is: wouldn't it be possible to extend your solution to
floppies and USB storage media ?

On Thu, 2003-08-14 at 17:43, Samphan Raruenrom wrote:
> Hi,
> 
> We have users found it as a surprise when they can't eject their CDs
> even when they are not in use. Some even call in here for support
> because they think there're something wrong with the software and
> our answer is just to click the right mouse there. This is due to the
> nature of usage of Linux in Thailand, mainly to replace proprietary
> software. So Thai linux users are not hackers. But NECTEC
> would like them to use Linux (or they will get Windows installed)
> so we try to make the transition as painless as possible.
> 
> This patch is the first of my experiment with the kernel. I first learn 
> that it is impossible to do this (ejectable) without modifying the
> kernel.
> Supermount can do this but it modify the kernel too much.
> My approach is to add an API to the CDROM driver for user-space
> to query the mount status of its device, specificially the question
> "is it ok to umount?" (will umount() return EBUSY)
> The API is implemented as a new ioctl, add 40 lines to cdrom.c.
> 
> The other part in magicdev is easy. It's just a new state BUSY
> and functions to handle transitions between new/old states.
> Magicdev also have to handle auto-umount which happend when
> user eject the CD, magicdev must be the one who umount
> the device.
> 
> The result will be like this :-
> - user insert CD - magicdev mount
> - user play an mp3 file - magicdev lock
> - user stop using the (any) file - magicdev unlock
> - user eject CD - magicdev umount
> 
> Please make comments about this approch. Having to modifying the kernel
> for this feature lead me to bug it here first, to make sure that I make
> the right decision before proposing to the kernel mailing list.
> http://bugzilla.gnome.org/show_bug.cgi?id=119892




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]