From: Ondrej Zary <linux@rainbow-software.org>
To: Austin S Hemmelgarn <ahferroin7@gmail.com>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>,
Kay Sievers <kay@vrfy.org>, Takashi Iwai <tiwai@suse.de>,
Jens Axboe <axboe@kernel.dk>, Oliver Neukum <oneukum@suse.de>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: How to fix CDROM/DVD eject mess?
Date: Mon, 2 Feb 2015 21:53:44 +0100 [thread overview]
Message-ID: <201502022153.44776.linux@rainbow-software.org> (raw)
In-Reply-To: <54CFD7CF.9080809@gmail.com>
On Monday 02 February 2015 21:02:23 Austin S Hemmelgarn wrote:
> On 2015-02-02 14:34, Maciej W. Rozycki wrote:
> > On Mon, 2 Feb 2015, Kay Sievers wrote:
> >>> I thought that fixing the udev behavior would solve the problem. But
> >>> it turned out that I was too naive. A bigger problem is that all
> >>> user-space stuff misinterprets DISK_EVENT_EJECT_REQUEST event: they
> >>> see this as if the disk is *ready* to be ejected. KDE, for example,
> >>> dismisses the DVD icon when it receives this event even if it's still
> >>> mounted.
> >>
> >> It is not really about being "ready to eject", if the user presses the
> >> button, the user does not want to wait for anything else than actually
> >> ejecting the media as fast as possible. It is the same as ripping out
> >> a USB cable. It needs to work, no matter if things are mounted or
> >> busy.
> >
> > All the technical details aside, this is a bold statement -- how do you
> > know what the user actually wants?
> >
> > 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.
> >
> > All I want to say here is there seems to be a policy hidden somewhere
> > here where it should not. It's up to the user to decide what suits him
> > or her. We just need to give them the right tools.
> >
> >> It is just a hardware button event which should not be masked out for
> >> rather weird reasons.
> >
> > Precisely, and I should have a way to control it. If I used a GUI, I
> > might want the event to pop up a window with the list of current users
> > (accessing processes) of the device, perhaps asking if to terminate them.
> > Or flip a relay to make my kettle boil water.
>
> I agree, there should be some option to control this, although
> personally, I would prefer two options, one for when it's read-only (in
> which case I would prefer the current behavior), and one for when it's
> read-write (in which case, I would prefer that the door-lock be engaged).
>
> Also, udev's current response isn't all that great either, when it get's
> the event, it should do a lazy unmount of the device. Windows and OS X
> automatically unmount filesystems from ejected media, so it is expected
> behavior for many users (and I keep meaning to open a bug against udev
> because of this, but keep forgetting).
>
> The fact that it stays mounted can cause all kinds of confusing issues
> as well if the user inserts a different disc; I've seen cases (recently
> in fact) where a new disc was inserted and due to caching, it showed
> dentries from the old disc, but with the files full of gibberish, and it
> refused to unmount the (now invalid) filesystem without using umount -f
> (which shouldn't be needed for a read-only FS, period).
At least Windows Me can do this with some CD/DVD drives:
If the eject button is pressed and a file is open from the CD, a dialog pops
up if you really want to eject the CD. If you click OK, the CD is ejected and
filesystem forcibly unmounted (programs running off the CD will crash). If
you click no, nothing happens.
If there's no file open from the CD, it simply ejects.
It worked with my Toshiba DVD drive but not (older) Toshiba CD drive - it
always ejected the CD. Looks like some drives can report eject button press
when locked and some can't.
--
Ondrej Zary
next prev parent reply other threads:[~2015-02-02 20:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 13:20 How to fix CDROM/DVD eject mess? Takashi Iwai
2015-02-02 19:03 ` Kay Sievers
2015-02-02 19:34 ` Maciej W. Rozycki
2015-02-02 19:45 ` Kay Sievers
2015-02-02 21:12 ` Maciej W. Rozycki
2015-02-03 12:36 ` Takashi Iwai
2015-02-03 8:52 ` Oliver Neukum
2015-02-03 13:34 ` One Thousand Gnomes
2015-02-03 17:53 ` Theodore Ts'o
2015-02-02 20:02 ` Austin S Hemmelgarn
2015-02-02 20:53 ` Ondrej Zary [this message]
2015-02-03 12:31 ` Takashi Iwai
2015-02-03 13:39 ` One Thousand Gnomes
2015-02-03 13:49 ` Takashi Iwai
2015-02-03 13:40 ` Austin S Hemmelgarn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201502022153.44776.linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=ahferroin7@gmail.com \
--cc=axboe@kernel.dk \
--cc=kay@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=oneukum@suse.de \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.