Re: How to fix CDROM/DVD eject mess?

From: Takashi Iwai
Date: Tue Feb 03 2015 - 07:37:00 EST


At Mon, 2 Feb 2015 21:12:34 +0000 (GMT),
Maciej W. Rozycki wrote:
>
> > > I for one want to see the medium locked if in use, just as it has been
> > > since 1990s. If I wanted to do an emergency eject (the equivalent of
> > > ripping out a USB cable), then I would use a paperclip in the manual eject
> > > hole. So you've got a counterexample to your assertion now. All people
> > > are not the same.
> >
> > It's just the current default setup and intentional behavior. You or
> > your distribution can for sure implement something else.
>
> Fair enough, but if this is a matter of decisions made by a distribution,
> then why is this an issue raised on LKML? What does it have to do with
> the kernel or why does it have to be addressed in the kernel, one way or
> another? Or does it indeed?

I originally raised the question to LKML since there are open problems
in the kernel side, too. For example, the eject event can be
generated only when the media is locked. It's a specification of
SCSI, but it doesn't mean that we have to provide only this way.

And, another issue is that DISK_EJECT_REQUESTED event is treated by
all user-space programs as if the device is actually ejected. It's a
misuse in user-space side, so ideally it's no kernel issue. But if
all user-space stuff misuses, it becomes it's right -- no matter what
is the original definition by kernel, I'm afraid.

Also, as already mentioned, the cdrom device ioctl behavior is
inconsistent among SCSI and others.


Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/