FreeBSD: notify userspace when a vdev is removed

This is needed for zfsd to autoreplace vdevs.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11260
This commit is contained in:
Ryan Moeller
2020-12-02 13:20:02 -05:00
committed by Brian Behlendorf
parent ed02d603a1
commit 7735c9addf
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -7903,6 +7903,9 @@ spa_async_remove(spa_t *spa, vdev_t *vd)
vd->vdev_stat.vs_checksum_errors = 0;
vdev_state_dirty(vd->vdev_top);
/* Tell userspace that the vdev is gone. */
zfs_post_remove(spa, vd);
}
for (int c = 0; c < vd->vdev_children; c++)