Subject: Re: port bio(4) and bioctl(8) from openbsd ?
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 04/07/2007 12:40:35
--rS8CxjVDS/+yyDmU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Apr 07, 2007 at 07:07:19PM +0200, Manuel Bouyer wrote:
> Hi,
> do we want to port the bio(4) interface and associated bioctl(8) tool
> from openbsd ? Basically it allows control of hardware RAID controllers i=
n a
> generic way (get states, add hot-spare, start rebuilds, etc ...).
> On OpenBSD it's currently supported on ami(4), arc(4), ciss(4), mfi(4).
> I won't go into the softraid stuff, at last not yet.
> Man pages:
> http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sbin/bioctl/bioctl.8=
?rev=3D1.43&content-type=3Dtext/plain
> http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/share/man/man4/bio.4=
?rev=3D1.19&content-type=3Dtext/plain
>=20
> In kernel, there's a pseudo-device (bio) to which RAID controllers regist=
ers
> (note that we can use the controllers without bio(4) in the kernel).
> This pseudo-device keeps a list of raid controllers, and dispatch the
> IOCTLs. This avoids having one major device per controller driver type.

I like the idea. My concern is that we already have the ld driver=20
framework for the devices on RAID cards and this would be a separate=20
framework for the cards. Is there some way we could harmonize all of it? I=
=20
agree that ld devices alone aren't what you want for this as you have to=20
be able to go from having no ld's on a card to having an ld.

> OpenBSD has added sensors for the drives: SENSOR_DRIVE, with the states:
> #define SENSOR_DRIVE_EMPTY    1
> #define SENSOR_DRIVE_READY    2
> #define SENSOR_DRIVE_POWERUP  3
> #define SENSOR_DRIVE_ONLINE   4
> #define SENSOR_DRIVE_IDLE     5
> #define SENSOR_DRIVE_ACTIVE   6
> #define SENSOR_DRIVE_REBUILD  7
> #define SENSOR_DRIVE_POWERDOWN        8
> #define SENSOR_DRIVE_FAIL     9
> #define SENSOR_DRIVE_PFAIL    10
> The benefit of this is that we could get notification in real time
> instead of polling though bioctl.

Sounds good.

Take care,

Bill

--rS8CxjVDS/+yyDmU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFGF/OzWz+3JHUci9cRAvkBAJ90bA67+V3Pj2acbsjh+CCagzlXFgCfZt3N
YGRMagOkGm2kwaUaxBusm3w=
=TmIE
-----END PGP SIGNATURE-----

--rS8CxjVDS/+yyDmU--