Skip to content

Commit

Permalink
vdev_open: clear async remove flag after reopen
Browse files Browse the repository at this point in the history
It's possible for a vdev to be flagged for async remove after the pool
has suspended. If the removed device has been returned when the pool is
resumed, the ASYNC_REMOVE task will still run at the end of txg, and
remove the device from the pool again.

To fix, we clear the async remove flag at reopen, just as we did for the
async fault flag in 5de3ac2.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes openzfs#16921
  • Loading branch information
robn authored and behlendorf committed Jan 3, 2025
1 parent e47b033 commit 4425a7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions module/zfs/vdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2041,6 +2041,7 @@ vdev_open(vdev_t *vd)
vd->vdev_cant_read = B_FALSE;
vd->vdev_cant_write = B_FALSE;
vd->vdev_fault_wanted = B_FALSE;
vd->vdev_remove_wanted = B_FALSE;
vd->vdev_min_asize = vdev_get_min_asize(vd);

/*
Expand Down

0 comments on commit 4425a7b

Please sign in to comment.