Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 2003 19:46:20 -0400 (EDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        "Greg 'groggy' Lehey" <grog@FreeBSD.org>
Cc:        current@FreeBSD.org
Subject:   Re: HEADSUP: Change of makedev() semantics.
Message-ID:  <Pine.NEB.3.96L.1030928193949.20493L-100000@fledge.watson.org>
In-Reply-To: <20030928230008.GF11520@wantadilla.lemis.com>

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

On Mon, 29 Sep 2003, Greg 'groggy' Lehey wrote:

> On Sunday, 28 September 2003 at 23:22:07 +0200, Poul-Henning Kamp wrote:
> > Basically:
> >
> > 	3. If you do a "normal" device driver, cache the result
> > 	   from when you call make_dev().
> > ...
> >
> > 	./dev/vinum
> > 		Failure to cache result of make_dev() ?
> 
> Where should this be cached?  Can you point to example code?

Actually, it looks like Vinum is caching the dev_t's, but it's not always
using them to get back to the dev_t--sometimes it's invoking makedev() 
instead.  However, this appears to happen only in the vinumrevive.c code,
so I'm not sure if that's a property of the cached reference being
unavailable -- it looks like it should be available in that context
though.  I.e., using sd->dev instead of VINUM_SD() -- it looks like there
is a valid (struct sd *) reference there to follow, so you can get to the
dev_t without doing a makedev(). 

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Network Associates Laboratories




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1030928193949.20493L-100000>