From owner-freebsd-current@FreeBSD.ORG Sun Feb 15 16:11:58 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 316F216A4CE for ; Sun, 15 Feb 2004 16:11:58 -0800 (PST) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9025343D1F for ; Sun, 15 Feb 2004 16:11:57 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: from panzer.kdm.org (localhost [127.0.0.1]) by panzer.kdm.org (8.12.9/8.12.5) with ESMTP id i1G0Bu64062481; Sun, 15 Feb 2004 17:11:56 -0700 (MST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.9/8.12.5/Submit) id i1G0BtSk062480; Sun, 15 Feb 2004 17:11:56 -0700 (MST) (envelope-from ken) Date: Sun, 15 Feb 2004 17:11:55 -0700 From: "Kenneth D. Merry" To: Poul-Henning Kamp Message-ID: <20040216001155.GA62253@panzer.kdm.org> References: <39982.1075975367@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <39982.1075975367@critter.freebsd.dk> User-Agent: Mutt/1.4.1i cc: current@freebsd.org Subject: Re: HEADSUP: disk_*(9) API change mega-patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Mon, 16 Feb 2004 00:11:58 -0000 On Thu, Feb 05, 2004 at 11:02:47 +0100, Poul-Henning Kamp wrote: > > This is a mostly mechanical and largely untested patch, so please test > carefully if you have the necessary hardware. > > Kernel patch: > http://phk.freebsd.dk/patch/disk.patch > > Man-page update: > http://phk.freebsd.dk/patch/disk_man.patch > > Patch version: 2004-02-05.1 > > This patch changes the disk_*(9) API so that ownership of the "struct > disk" is moved from the device drivers to GEOM. This removes a lot > of trouble from the disk_destroy(9) handling, which should be robust > with this patch. > > After this change the API works as follows: > > allocated struct disk with disk_alloc(), store pointer in softc. > populate fields, including d_unit and d_flags which were > previous arguments to disk_create(). > call disk_create() with the pointer. > > call disk_destroy() to signal that the device has disappeared. > NB: do not access struct disk in the driver anymore! > return any outstanding requests with suitable error. > > At the same time: eliminate unused arguments from disk_create(9) > > Reverse sense of DISKFLAG_NOGIANT, to DISKFLAG_NEEDSGIANT. > > Two weeks review In scsi_da.c, you have some changes that are not related to this: - you've added a quirk entry. This should be run through njl. - you're sending a TUR in dagetcapacity(), which shouldn't be necessary. See rev 1.88 of scsi_cd.c and rev 1.55 of cam_periph.c. Ken -- Kenneth Merry ken@FreeBSD.org