Subject: Re: port bio(4) and bioctl(8) from openbsd ?
To: Andrew Doran <ad@NetBSD.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 04/08/2007 12:22:51
On Sun, Apr 08, 2007 at 12:39:13AM +0100, Andrew Doran wrote:
[...]
> >> 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.
> 
> I'm a bit concerned about what it lets you do

For the sensor framework: just monitor drive status

> and what it replaces but
> I need to do my research :-).

For mfi: nothing, we don't have any way right now to get status/alarms from
the controller.

> In the two instances where we do have
> pretty good native tools (for DPT/Adaptec controllers) I'd be a bit
> reluctant to see the capability go.

Eventually support for bio/sysmon could be added to these controllers,
but I don't plan to remove support for other, existing tools.

> In the interests of security it
> I think does make sense though.

For security, I think each native support needs to be looked at. kauth
support could be added to the native ioctls. For tools like the one for
amr, we either need to decode the command sent to the controller,
or just claim that any command will change the state of the
controller.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--