Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933434AbbBBUDN (ORCPT ); Mon, 2 Feb 2015 15:03:13 -0500 Received: from mail-ie0-f170.google.com ([209.85.223.170]:34111 "EHLO mail-ie0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753762AbbBBUDK (ORCPT ); Mon, 2 Feb 2015 15:03:10 -0500 Message-ID: <54CFD7CF.9080809@gmail.com> Date: Mon, 02 Feb 2015 15:02:23 -0500 From: Austin S Hemmelgarn User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Maciej W. Rozycki" , Kay Sievers CC: Takashi Iwai , Jens Axboe , Oliver Neukum , LKML Subject: Re: How to fix CDROM/DVD eject mess? References: In-Reply-To: x-hashcash: 1:21:150202:macro@linux-mips.org::8a441bcbb8bfd5a693a70a60fee068e5:b89b3ff54dd5625e x-hashcash: 1:21:150202:kay@vrfy.org::8de05a52cd16745c6df70a52d49dcb45:19737a8b2583c5de x-hashcash: 1:21:150202:tiwai@suse.de::f2a08c637f80bda79c5dc78e3b52ef3b:ed990f81f4f4bce1 x-hashcash: 1:21:150202:axboe@kernel.dk::3d66afb330f3931ee0f97d87c9fcc7b7:8de27b6d7fad791c x-hashcash: 1:21:150202:oneukum@suse.de::ceb090584b7671d3cc5abb6a2293af36:61e37fc528746a72 x-hashcash: 1:21:150202:linux-kernel@vger.kernel.org::405a407c8a169352701e9ba58ab64d2e:69877183e6c94d80 x-stampprotocols: hashcash:1:17;mbound:0:10:3000:5000 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms020909040106050100000406" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6928 Lines: 136 This is a cryptographically signed message in MIME format. --------------ms020909040106050100000406 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable 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 y= ou > know what the user actually wants? > > I for one want to see the medium locked if in use, just as it has bee= n > 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 ej= ect > hole. So you've got a counterexample to your assertion now. All peopl= e > 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 the= m. > Or flip a relay to make my kettle boil water. I agree, there should be some option to control this, although=20 personally, I would prefer two options, one for when it's read-only (in=20 which case I would prefer the current behavior), and one for when it's=20 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=20 automatically unmount filesystems from ejected media, so it is expected=20 behavior for many users (and I keep meaning to open a bug against udev=20 because of this, but keep forgetting). The fact that it stays mounted can cause all kinds of confusing issues=20 as well if the user inserts a different disc; I've seen cases (recently=20 in fact) where a new disc was inserted and due to caching, it showed=20 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=20 (which shouldn't be needed for a read-only FS, period). --------------ms020909040106050100000406 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIFuDCC BbQwggOcoAMCAQICAw9gVDANBgkqhkiG9w0BAQ0FADB5MRAwDgYDVQQKEwdSb290IENBMR4w HAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNBIENlcnQgU2lnbmlu ZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRAY2FjZXJ0Lm9yZzAeFw0xNDA4 MDgxMTMwNDRaFw0xNTAyMDQxMTMwNDRaMGMxGDAWBgNVBAMTD0NBY2VydCBXb1QgVXNlcjEj MCEGCSqGSIb3DQEJARYUYWhmZXJyb2luN0BnbWFpbC5jb20xIjAgBgkqhkiG9w0BCQEWE2Fo ZW1tZWxnQG9oaW9ndC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDdmm8R BM5D6fGiB6rpogPZbLYu6CkU6834rcJepfmxKnLarYUYM593/VGygfaaHAyuc8qLaRA3u1M0 Qp29flqmhv1VDTBZ+zFu6JgHjTDniBii1KOZRo0qV3jC5NvaS8KUM67+eQBjm29LhBWVi3+e a8jLxmogFXV0NGej+GHIr5zA9qKz2WJOEoGh0EfqZ2MQTmozcGI43/oqIYhRj8fRMkWXLUAF WsLzPQMpK19hD8fqwlxQWhBV8gsGRG54K5pyaQsjne7m89SF5M8JkNJPH39tHEvfv2Vhf7EM Y4WGyhLAULSlym1AI1uUHR1FfJaj3AChaEJZli/AdajYsqc7AgMBAAGjggFZMIIBVTAMBgNV HRMBAf8EAjAAMFYGCWCGSAGG+EIBDQRJFkdUbyBnZXQgeW91ciBvd24gY2VydGlmaWNhdGUg Zm9yIEZSRUUgaGVhZCBvdmVyIHRvIGh0dHA6Ly93d3cuQ0FjZXJ0Lm9yZzAOBgNVHQ8BAf8E BAMC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Ai14E/AuAOdrrb2yArS823CeML8uWRhFNcGOOjNS1SuX 7AeHoyOk2UMKCU4pQ79fLjAjhU1pM5D5shboPvqJlDkIqcNMeQgCmwkFQVzuXPvSGCvjajie HL4gVhsulO5vEUTQvqh0E2G5nwAAAAAAAA== --------------ms020909040106050100000406-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/