Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2006 09:15:42 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, John-Mark Gurney <gurney_j@resnet.uoregon.edu>, freebsd-arch@freebsd.org
Subject:   Re: Accessing disks via their serial numbers.
Message-ID:  <20060626090937.U24406@fledge.watson.org>
In-Reply-To: <20060626080038.GA12511@garage.freebsd.pl>
References:  <20060626031636.GK82074@funkthat.com> <33398.1151304697@critter.freebsd.dk> <20060626080038.GA12511@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mon, 26 Jun 2006, Pawel Jakub Dawidek wrote:

> On Mon, Jun 26, 2006 at 06:51:37AM +0000, Poul-Henning Kamp wrote:
>> In message <20060626031636.GK82074@funkthat.com>, John-Mark Gurney writes:
>>
>>> 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?
>>
>> This is more or less what Pawel asked me for, and I am not at all
>> convinced that is how we want to do it.
>
> Actually I proposed the opposite: remove some d_* fields and make them 
> available via discussed mechanism.

Yes -- one of the problems/benefits of the disk(9) API is that it's a very 
narrow API.  I'd like to see an attribute API pushed into disk(9) so that GEOM 
modules can query additional disk properties in much the same way they can 
query GEOM attributes.  However, I think that we should not move existing 
mandatory fields out if they really are mandatory -- right now the API 
guarantees that certain values will always be available, and will not change. 
By re-exposing them via an attribute interface, we allow for the possibility 
of them being unavailable or changing.  GEOM univerally provides similar 
guarantees, such as sectorsize not changing.  Media size is a slightly more 
dubious one, of course, and probably should become variable.

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060626090937.U24406>