Subject: Re: DIOCEJECT changes
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Soren S. Jorvang <soren@t.dk>
List: tech-kern
Date: 02/03/1999 19:46:51
On Wed, Feb 03, 1999 at 12:00:36PM +0100, Manuel Bouyer wrote:
> I'd like to change DIOCEJECT to check that the only partition open is the one
> doing the ioctl. If so, the door is unlocked before doing the eject.
> If not, EBUSY is returned. DIOCEJECT would take an interger as argument,
> and bypass the above check if set (that is, it would have the old behavior).
> The old DIOCEJECT would be renamed to ODIOCEJECT for binary compatibility.
> 
> This would allow us to have a much cleaner eject(1), along with better
> reliability.

I like it. I also think the new eject(1) should just punt if DIOEJECT fails -
getting unmounting right always is just too tricky.

Changing DIOCJECT might also be a good opportunity to create a more
generic eject ioctl to cover tapes and miscellaneous as well.

(Expanding the recent open-with-no-media changes to cover st (and perhaps
other streamer drivers) to replace the current always-open sematics of
minor 3 could also be a good idea.)


-- 
Soren