Don't mark vdev as healthy too soon, so we won't try to use invalid vdevs.
MFC after: 3 days
This commit is contained in:
parent
9498501254
commit
f8d5a41b64
@ -543,8 +543,6 @@ vdev_init_from_nvlist(const unsigned char *nvlist, vdev_t *pvdev,
|
|||||||
vdev->v_state = VDEV_STATE_DEGRADED;
|
vdev->v_state = VDEV_STATE_DEGRADED;
|
||||||
else if (isnt_present)
|
else if (isnt_present)
|
||||||
vdev->v_state = VDEV_STATE_CANT_OPEN;
|
vdev->v_state = VDEV_STATE_CANT_OPEN;
|
||||||
else
|
|
||||||
vdev->v_state = VDEV_STATE_HEALTHY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = nvlist_find(nvlist, ZPOOL_CONFIG_CHILDREN,
|
rc = nvlist_find(nvlist, ZPOOL_CONFIG_CHILDREN,
|
||||||
@ -912,6 +910,7 @@ vdev_probe(vdev_phys_read_t *read, void *read_priv, spa_t **spap)
|
|||||||
if (vdev) {
|
if (vdev) {
|
||||||
vdev->v_phys_read = read;
|
vdev->v_phys_read = read;
|
||||||
vdev->v_read_priv = read_priv;
|
vdev->v_read_priv = read_priv;
|
||||||
|
vdev->v_state = VDEV_STATE_HEALTHY;
|
||||||
} else {
|
} else {
|
||||||
printf("ZFS: inconsistent nvlist contents\n");
|
printf("ZFS: inconsistent nvlist contents\n");
|
||||||
return (EIO);
|
return (EIO);
|
||||||
|
Loading…
Reference in New Issue
Block a user