From owner-freebsd-current@FreeBSD.ORG Fri Jan 9 14:12:14 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49A9510656F3 for ; Fri, 9 Jan 2009 14:12:14 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out1.uni-muenster.de (ZIVM-OUT1.UNI-MUENSTER.DE [128.176.192.8]) by mx1.freebsd.org (Postfix) with ESMTP id CF77E8FC14 for ; Fri, 9 Jan 2009 14:12:13 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.37,239,1231110000"; d="scan'208";a="266665045" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 09 Jan 2009 15:12:11 +0100 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 9C43F1B074C; Fri, 9 Jan 2009 15:12:11 +0100 (CET) Date: Fri, 09 Jan 2009 15:12:10 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: "Carlos A. M. dos Santos" Subject: Re: patch to fix burncd bug X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 14:12:14 -0000 the actual problem is that the return value EBUSY got overwritten in sys/dev/ata/ata-queue.c. so even when the device returns EBUSY the ioctl call returned EIO. what your patch does is to wait for a specific time until it gives up calling ioctl(fd, CDIOCEJECT). with the changes to sys/dev/ata/atapi-cd.c the EBUSY return value doesn't get overwritten anymore. now when an ioctl call returns EIO you don't have to repeat doing the ioctl. EIO really means EIO! only if the return value is EBUSY you have to repeat doing an ioctl until it returns != EBUSY. alex Carlos A. M. dos Santos schrieb am 2009-01-09: > On Thu, Jan 8, 2009 at 8:59 PM, Giorgos Keramidas > wrote: > > On Thu, 08 Jan 2009 18:13:14 +0100 (CET), Alexander Best > > wrote: > >> could somebody please commit the following patch to dev/ata? it > >> fixes > >> a nasty bug during fixation in burncd. the bug exists in RELENG6, > >> RELENG7 and HEAD (and maybe RELENG5): > >> http://www.freebsd.org/cgi/query-pr.cgi?prp=95979-3-txt&n=/patch > >> the whole PR can be found here: > >> http://www.freebsd.org/cgi/query-pr.cgi?pr=95979 > > I think Soren is the best person to look into this bug (Cc: added). > > Soren, what do you think? Does the patch at bin/95979 look like a > > nice > > change to commit? I just saw this PR so I haven't tried the patch > > on my > > laptop's CURRENT yet, but I can confirm that burning CD-ROMs and > > DVDs is > > busted in my laptop for a few weeks now. > I proposed a solution a similar problem (bin/123693), but patching > burncd instead of the kernel. I'm attaching the patch, for your > convenience.