Skip to content

Commit 5de3ac2

Browse files
robndon-brady
authored andcommitted
vdev_open: clear async fault flag after reopen
After c3f2f1a, vdev_fault_wanted is set on a vdev after a probe fails. An end-of-txg async task is charged with actually faulting the vdev. In a single-disk pool, the probe failure will degrade the last disk, and then suspend the pool. However, vdev_fault_wanted is not cleared. After the pool returns, the transaction finishes and the async task runs and faults the vdev, which suspends the pool again. The fix is simple: when reopening a vdev, clear the async fault flag. If the vdev is still failed, the startup probe will quickly notice and degrade/suspend it again. If not, all is well! Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Co-authored-by: Don Brady <[email protected]> Signed-off-by: Rob Norris <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Don Brady <[email protected]>
1 parent 393b7ad commit 5de3ac2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

module/zfs/vdev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,6 +2021,7 @@ vdev_open(vdev_t *vd)
20212021
vd->vdev_stat.vs_aux = VDEV_AUX_NONE;
20222022
vd->vdev_cant_read = B_FALSE;
20232023
vd->vdev_cant_write = B_FALSE;
2024+
vd->vdev_fault_wanted = B_FALSE;
20242025
vd->vdev_min_asize = vdev_get_min_asize(vd);
20252026

20262027
/*

0 commit comments

Comments
 (0)