Propagate vdev state change on probe failure

Currently, when probe fails on some vdev, it would became
faulted, but the parent's vdev state won't be changed. So we
can have a situation, for example, when several disks in draid
vdev are faulted (domain failure), but draid vdev itself and
pool are online, which doesn't seem right.

Solution: set isopen argument to false when calling
vdev_set_state() from spa_async_fault_vdev(). It's not quite
clear why it was set to true in the first place when the code
was introduced at commit c4f2f1aa2d.

isopen argument to vdev_set_state() is normally set to true
when we are "in the process of opening children depth-first",
in which case we don't want to propagate the change of state
to the parent, but it doesn't seem to be the case here.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Andriy Tkachuk <[email protected]>
Closes #19155
This commit is contained in:
Andriy Tkachuk authored and GitHub committed 2026-09-22 16:13:10 -07:00
1 parent a83d968356
commit 9d7260c9b4
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -10040,7 +10040,7 @@ spa_async_fault_vdev(vdev_t *vd, boolean_t *suspend)
/* A required disk is missing so suspend the pool */
*suspend = B_TRUE;
}
vdev_set_state(vd, B_TRUE, newstate, VDEV_AUX_ERR_EXCEEDED);
vdev_set_state(vd, B_FALSE, newstate, VDEV_AUX_ERR_EXCEEDED);
}
for (int c = 0; c < vd->vdev_children; c++)
spa_async_fault_vdev(vd->vdev_child[c], suspend);
@@ -87,7 +87,7 @@ for x in {0,1,2,4}; do
done
# Expect that the pool was not suspended
log_must check_state $MMP_POOL "" "ONLINE"
log_must check_state $MMP_POOL "" "DEGRADED"
health=$(zpool list -H -o health $MMP_POOL)
log_note "$MMP_POOL health is $health"
[[ "$health" == "SUSPENDED" ]] && log_fail "$MMP_POOL $health unexpected"