From owner-freebsd-questions@FreeBSD.ORG Thu Dec 13 11:08:47 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E078A16A421 for ; Thu, 13 Dec 2007 11:08:47 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: from wmail.teledomenet.gr (wmail.teledomenet.gr [213.142.128.16]) by mx1.freebsd.org (Postfix) with ESMTP id 630C613C45B for ; Thu, 13 Dec 2007 11:08:47 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: by wmail.teledomenet.gr (Postfix, from userid 1002) id 6A00A1C8629; Thu, 13 Dec 2007 13:08:46 +0200 (EET) X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on wmail.teledomenet.gr X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.7-deb Received: from iris (unknown [192.168.1.71]) by wmail.teledomenet.gr (Postfix) with ESMTP id A2C1D1C861E; Thu, 13 Dec 2007 13:08:37 +0200 (EET) From: Nikos Vassiliadis To: Andriy Gapon Date: Thu, 13 Dec 2007 13:12:27 +0200 User-Agent: KMail/1.9.7 References: <475FC26C.3030508@icyb.net.ua> <200712131213.37478.nvass@teledomenet.gr> <47610957.8020800@icyb.net.ua> In-Reply-To: <47610957.8020800@icyb.net.ua> X-NCC-RegID: gr.telehouse MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712131312.28148.nvass@teledomenet.gr> Cc: freebsd-questions@freebsd.org Subject: Re: mounted cd and tray locking X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2007 11:08:48 -0000 On Thursday 13 December 2007 12:28:39 Andriy Gapon wrote: > on 13/12/2007 12:13 Nikos Vassiliadis said the following: > > On Thursday 13 December 2007 11:42:00 Andriy Gapon wrote: > >> on 13/12/2007 09:30 Nikos Vassiliadis said the following: > >>> On Wednesday 12 December 2007 18:58:44 Andriy Gapon wrote: > >>>> Hmm. Looked at the code and it should be as expected. Played with > >>>> various stuff and here's what I think: it seems that having > >>>> atapicam and hald and maybe something in KDE that polls for CD > >>>> change is to blame. > >>> > >>> I have no atapicam in my kernel. Nor hald running. > >>> I reproduced it like this: > >>> mount /cdrom > >>> cdcontrol eject > >> > >> I don't think you reproduced it. Why would you execute the above > >> command unless it is your intention to eject the disk ? > > > > You got it wrong. cdcontrol *does not* eject the disk, it works > > correctly, as it should. cdcontrol never ejects mounted media. > > Well, I got it right, it's just that in my opinion you knew what you > were doing. Thanks for the wording... > > > It triggers the situation where I can then press the eject key > > on the cdrom and really eject the cdrom. > > It would be interesting to see what exact ioctls/commands cdcontrol > issues. ktrace+kdump can help with this. Assuming your drive is ATAPI > (not SCSI) then if only CDIOCEJECT is issued then the drive should not > become unlocked. How can this be interesting? cdcontrol does not open the tray. cdcontrol gets an EBUSY and exits. The button does. So, it seems to the - naive - me that the error is somewhere in the kernel. > > Nevertheless ejecting a mounted medium is wrong. And that's not > > a feature. This is obviously a problem, regardless of how you > > trigger it. Would you like to file a PR? > > Well, I see your point and probably I would agree 80% with you :-) > But this issue seems to be a little bit different from the issue that > concerns me most (which I explained in another email). > Someone could reply to your problem with that old joke: > - Doctor, it hurts when I do this. > - Then don't do it. I believe that the "old joke" doesn't apply here. I will file a PR when I'll have available time. Nikos