mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
Before this change zed tried to activate spares just in order they are stored in configuration, which is quite arbitrary. To make the result more optimal, sort the spares by their rotational status and size, so that the most fitting ones have better chances. To make it more visible, export the rotational status as a vdev property. While at it, minimally fix vdev properties reading for spare and L2ARC vdevs, having no ZAPs. To keep the rotational status for spare activation purposes when failed device is already gone, save it into the vdev config. The same is for spare vdevs asize. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Closes #18597