From owner-freebsd-arch@FreeBSD.ORG Mon Jun 26 06:44:49 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 B6F2A16A406 for ; Mon, 26 Jun 2006 06:44:49 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DD2243D9C for ; Mon, 26 Jun 2006 06:44:39 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 0EEDB5131F; Mon, 26 Jun 2006 08:44:38 +0200 (CEST) Received: from localhost (dkk69.neoplus.adsl.tpnet.pl [83.24.14.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 68EFC50E81; Mon, 26 Jun 2006 08:44:32 +0200 (CEST) Date: Mon, 26 Jun 2006 08:41:36 +0200 From: Pawel Jakub Dawidek To: "M. Warner Losh" Message-ID: <20060626064136.GD8499@garage.freebsd.pl> References: <20060624174331.GB2134@garage.freebsd.pl> <20060625.174838.2140534929.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5G06lTa6Jq83wMTw" Content-Disposition: inline In-Reply-To: <20060625.174838.2140534929.imp@bsdimp.com> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: 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 06:44:49 -0000 --5G06lTa6Jq83wMTw Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 25, 2006 at 05:48:38PM -0600, M. Warner Losh wrote: > 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/). >=20 > /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. Some drivers use disk(9) for their own, so we could have: /dev/disk/{ad,da,aac,amr,ida,ips,mlx,pst,twe,mfi}/ (if I understand things right) But I'm not convinced about driver's name. If I've two controllers in the system and will connect the same disk to a different driver I'd like to be able to access it using the same name. That's the whole point, right? > If all the dev_t's had a device_t, then we could hang this information > off of devd. It could create whatever links you wanted when the > device appeared, and remove them when it disappeared. There'd really > be no need to have geom involved at all :-). >=20 > : It could be eventually useful to be able to ask the disk which > : attributes it has, so we can fetch them in a loop. With BIO_GETATTR we > : don't know which attributes provider can return. >=20 > device_t's already have a number of bundles of attributes. It would > seem a shame to reinvent another mechnamism. And what if I'd like to export a serial from gmirror, which has no device_t nor dev_t (at least not controlled by me)? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --5G06lTa6Jq83wMTw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEn4GgForvXbEpPzQRAqe0AKCx8+wyLl9BzBjb7jCuuuBOn44OzQCeIp09 c8Y1ptGGZfVfrb4jdVEVpdA= =KBET -----END PGP SIGNATURE----- --5G06lTa6Jq83wMTw--