MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vdev_root_state_change

Function vdev_root_state_change

freebsd/contrib/openzfs/module/zfs/vdev_root.c:131–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131static void
132vdev_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
144vdev_ops_t vdev_root_ops = {
145 .vdev_op_init = NULL,

Callers

nothing calls this directly

Calls 2

too_many_errorsFunction · 0.85
vdev_set_stateFunction · 0.85

Tested by

no test coverage detected