| 129 | } |
| 130 | |
| 131 | static void |
| 132 | vdev_root_state_change(vdev_t *vd, int faulted, int degraded) |
| 133 | { |
| 134 | if (too_many_errors(vd, faulted)) { |
| 135 | vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN, |
| 136 | VDEV_AUX_NO_REPLICAS); |
| 137 | } else if (degraded || faulted) { |
| 138 | vdev_set_state(vd, B_FALSE, VDEV_STATE_DEGRADED, VDEV_AUX_NONE); |
| 139 | } else { |
| 140 | vdev_set_state(vd, B_FALSE, VDEV_STATE_HEALTHY, VDEV_AUX_NONE); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | vdev_ops_t vdev_root_ops = { |
| 145 | .vdev_op_init = NULL, |
nothing calls this directly
no test coverage detected