From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67DAEC432C0 for ; Thu, 21 Nov 2019 23:43:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3DC63206D7 for ; Thu, 21 Nov 2019 23:43:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726967AbfKUXnq (ORCPT ); Thu, 21 Nov 2019 18:43:46 -0500 Received: from mx2.suse.de ([195.135.220.15]:44088 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726038AbfKUXnp (ORCPT ); Thu, 21 Nov 2019 18:43:45 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E2D6CAECB; Thu, 21 Nov 2019 23:43:42 +0000 (UTC) Date: Fri, 22 Nov 2019 00:43:39 +0100 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Jens Axboe Cc: linux-scsi@vger.kernel.org, linux-block@vger.kernel.org, Jonathan Corbet , "James E.J. Bottomley" , "Martin K. Petersen" , Alexander Viro , Eric Biggers , "J. Bruce Fields" , Mauro Carvalho Chehab , Benjamin Coddington , Ming Lei , Chaitanya Kulkarni , Bart Van Assche , Damien Le Moal , Hou Tao , Pavel Begunkov , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jan Kara , Hannes Reinecke , "Ewan D. Milne" , Christoph Hellwig , Matthew Wilcox Subject: Re: [PATCH v4 00/10] Fix cdrom autoclose Message-ID: <20191121234339.GL11661@kitsune.suse.cz> References: <4ba670de-80d4-130e-91f3-c6e1cc9c7a47@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ba670de-80d4-130e-91f3-c6e1cc9c7a47@kernel.dk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 21, 2019 at 12:00:03PM -0700, Jens Axboe wrote: > On 11/21/19 10:13 AM, Michal Suchanek wrote: > > Hello, > > > > there is cdrom autoclose feature that is supposed to close the tray, > > wait for the disc to become ready, and then open the device. > > > > This used to work in ancient times. Then in old times there was a hack > > in util-linux which worked around the breakage which probably resulted > > from switching to scsi emulation. > > > > Currently util-linux maintainer refuses to merge another hack on the > > basis that kernel still has the feature so it should be fixed there. > > The code needs not be replicated in every userspace utility like mount > > or dd which has no business knowing which devices are CD-roms and where > > the autoclose setting is in the kernel. > > This is a lot of code/churn (and even an fops addition...) to work around > a broken hw emulation, essentially. Why aren't we just pushing vmware > to fix this? This is fix for kernel feature: cdrom autoclose. There is one patch that deals with blacklisting the feature on VMWare becase their emulation is broken and triggers an issue with the feature when it actually works. Thanks Michal