On Wed, Aug 30, 2017 at 02:20:31PM +0200, Patrick Wildt wrote:
> Hi,
> 
> like our other hardware raid controller drivers, softraid should
> report the rebuild state properly.  Currently the sensor exports
> the drive state in that case as "unknown", which is misleading.
> 
> ok?
> 

makes sense to me. ok

> Patrick
> 
> diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
> index 1593c76bdcd..280e832f849 100644
> --- a/sys/dev/softraid.c
> +++ b/sys/dev/softraid.c
> @@ -4867,6 +4867,11 @@ sr_sensors_refresh(void *arg)
>                       sv->sv_sensor.status = SENSOR_S_WARN;
>                       break;
>  
> +             case BIOC_SVREBUILD:
> +                     sv->sv_sensor.value = SENSOR_DRIVE_REBUILD;
> +                     sv->sv_sensor.status = SENSOR_S_WARN;
> +                     break;
> +
>               case BIOC_SVSCRUB:
>               case BIOC_SVONLINE:
>                       sv->sv_sensor.value = SENSOR_DRIVE_ONLINE;
> 

Reply via email to