From owner-freebsd-arch@FreeBSD.ORG Mon Jun 26 03:53:24 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8419E16A403; Mon, 26 Jun 2006 03:53:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2697843D5C; Mon, 26 Jun 2006 03:53:24 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k5Q3oRRX087517; Sun, 25 Jun 2006 21:50:27 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 25 Jun 2006 21:50:30 -0600 (MDT) Message-Id: <20060625.215030.1210473959.imp@bsdimp.com> To: gurney_j@resnet.uoregon.edu From: "M. Warner Losh" In-Reply-To: <20060626031636.GK82074@funkthat.com> References: <20060624174331.GB2134@garage.freebsd.pl> <20060625.174838.2140534929.imp@bsdimp.com> <20060626031636.GK82074@funkthat.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: pjd@freebsd.org, freebsd-arch@freebsd.org Subject: Re: Accessing disks via their serial numbers. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2006 03:53:24 -0000 In message: <20060626031636.GK82074@funkthat.com> John-Mark Gurney writes: : Warner Losh wrote this message on Sun, Jun 25, 2006 at 17:48 -0600: : > In message: <20060624174331.GB2134@garage.freebsd.pl> : > Pawel Jakub Dawidek writes: : > : I'd like to extend glabel(8) to create providers related to disks based : > : on their serial numbers and everntually driver name. : > : For example disk ad0 could also be accessed via /dev/disk/ata/3JX0LMGA : > : (/dev/disk// or /dev/disk/). : > : > /dev/disk/ad/3JX0LMGA or /dev/disk/da/3JX0LMGA is the only thing : > you'll be able to do. There's no mapping from the dev_t -> device_t, : > so you have no way of knowing what the parent of the disk's dev_t. : > All the I/O in the system is done with dev_t's. : > : > Also, the cam system doesn't hook into the newbus system due to when : > it was authored. There's been some resistance to moving the scsi : > devices into the device_t tree, like all other storage devices. This : > is part of the problem indoing thinging completely generically. : : Can't we expand the disk api? add a const char *d_serial to the struct : disk, and have the disk api automaticly propegate the serial number up : to the geom layer? We could do that, yes. However, that's hardly generic... Warner