From 4425a7bb851f3c6b657062ee4df0c00216faa557 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 4 Jan 2025 09:42:06 +1100 Subject: [PATCH] vdev_open: clear async remove flag after reopen 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 5de3ac223. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Signed-off-by: Rob Norris Closes #16921 --- module/zfs/vdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index ac5230ebd..d9c587182 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -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); /*