Subject: Re: Vinum in NetBSD: status and questions
To: Greg 'groggy' Lehey <grog@lemis.com>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: current-users
Date: 04/08/2003 13:12:54
Greg 'groggy' Lehey wrote:
>   	(*bdevsw[major(rqe->b.b_dev)]->d_strategy) (&rqe->b);

Is it lookup for the underlying disk device? Then you'd need
to use bdevsw_lookup(9). raidframe rf_netbsdkintf.c uses this:

	bdev = bdevsw_lookup(bp->b_dev);
	if (bdev == NULL)
		return (ENXIO);
	(*bdev->d_strategy)(bp);

> 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.

Yes, there was a work on block/character device lists (gehenna-devsw
branch), to make it easier to maintain and support LKMs better.
The old cdevsw[]/bdevsw[] arrays are gone for good.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.org/
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-