From owner-cvs-src@FreeBSD.ORG Fri Nov 16 17:42:09 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7537D16A46B; Fri, 16 Nov 2007 17:42:09 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 242B513C4D3; Fri, 16 Nov 2007 17:42:08 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 48C5217105; Fri, 16 Nov 2007 17:24:14 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.1/8.14.1) with ESMTP id lAGHOC6G029577; Fri, 16 Nov 2007 17:24:13 GMT (envelope-from phk@critter.freebsd.dk) To: Scott Long From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 16 Nov 2007 10:12:01 MST." <473DCF61.6010107@samsco.org> Date: Fri, 16 Nov 2007 17:24:12 +0000 Message-ID: <29576.1195233852@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, =?ISO-8859-1?Q?S=F8ren_Schmidt?= , Nate Lawson Subject: Re: cvs commit: src/sys/dev/ata atapi-cd.c atapi-cd.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2007 17:42:09 -0000 In message <473DCF61.6010107@samsco.org>, Scott Long writes: >> What I've sortof talked phk into is that if I return the "right" error >> code in the "start" function, it will back off and not retry nor chatter. >> We still need the "access" function to return OK if HW present or we >> cannot send ioctl calls to an empty drive. >> > >IMHO, overloading g_start just adds more cruft to the problem. The fundamental problem is that the CDROM ioctls don't distinguish between drive and media. In a nutshell: we are forced to let the open succeed, so the ioctl to close the tray can be issued, before we can get at the media. The problem with letting the open (aka g_access) succeed, is that the GEOM tasting starts. Redefining the ioctls is not a realistic option at this point, so the task is to find a workaround for the API-deficiency. What sos@ and I talked about is that we need to have an error return that says "The drive is here, but there is no media", to fail the tasting without GEOM reporting I/O errors on the console. The simplest way to do this, is probably to overload ENOENT or some other currently undefined errno for this effect. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.