Subject: Re: Vinum in NetBSD: status and questions
To: Jaromir Dolecek <jdolecek@netbsd.org>
From: Greg 'groggy' Lehey <grog@lemis.com>
List: current-users
Date: 04/08/2003 19:35:10
--PhxIMoEr374zxJm2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tuesday, 8 April 2003 at 11:13:23 +0200, Jaromir Dolecek wrote:
> Greg 'groggy' Lehey wrote:
>
>> 2. I see that direct access to bdevsw[] is no longer used. Instead,
>> there's the bdevsw_lookup() function. In the case of Vinum,
>> bdevsw accesses are either to Vinum itself, or to one of the
>> drives. Can I assume that the drive will not lose its bdevsw? Or
>> should I call bdevsw_lookup() for every I/O?
>
> Every driver defines it's own bdevsw, which is added to system lists
> on boot.
Understood. That works fine. But it's a question of how I talk to
it. In classical UNIX, I'd write
(*bdevsw[major(rqe->b.b_dev)]->d_strategy) (&rqe->b);
That doesn't seem to work in 1.6Q, and I was asking for what the Right
Thing To Do is. It could be a missing header file, but comparing what
RAIDFrame does, I get the feeling that there has been a conscious
decision to deprecate this style. An obvious reason would be that if
the major number isn't allocated, you'll make a real mess of the
system.
Greg
--
Finger grog@lemis.com for PGP public key
See complete headers for address and phone numbers
--PhxIMoEr374zxJm2
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (FreeBSD)
iD8DBQE+kp7WIubykFB6QiMRAlV0AJwNpTb6gkMKwJPpDAv7WevZcFWrewCfVDoL
OnLmTR5WXuuOdNP2r2D3pLw=
=97rD
-----END PGP SIGNATURE-----
--PhxIMoEr374zxJm2--