diff options
author | Ameer Hamza <[email protected]> | 2022-09-28 21:48:46 +0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-09-28 09:48:46 -0700 |
commit | 55c12724d377e6c7ace5b4bd42cd728d4a60af3e (patch) | |
tree | e5d28efce371d1097882dc064c16f362560e933e /include/sys/vdev.h | |
parent | eb9bec0a5d19abf9404f52081424fbb814e6188a (diff) |
zed: mark disks as REMOVED when they are removed
ZED does not take any action for disk removal events if there is no
spare VDEV available. Added zpool_vdev_remove_wanted() in libzfs
and vdev_remove_wanted() in vdev.c to remove the VDEV through ZED
on removal event. This means that if you are running zed and
remove a disk, it will be properly marked as REMOVED.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Ameer Hamza <[email protected]>
Closes #13797
Diffstat (limited to 'include/sys/vdev.h')
-rw-r--r-- | include/sys/vdev.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sys/vdev.h b/include/sys/vdev.h index 5fec1d51a..7a7c70dc1 100644 --- a/include/sys/vdev.h +++ b/include/sys/vdev.h @@ -148,6 +148,7 @@ extern int vdev_degrade(spa_t *spa, uint64_t guid, vdev_aux_t aux); extern int vdev_online(spa_t *spa, uint64_t guid, uint64_t flags, vdev_state_t *); extern int vdev_offline(spa_t *spa, uint64_t guid, uint64_t flags); +extern int vdev_remove_wanted(spa_t *spa, uint64_t guid); extern void vdev_clear(spa_t *spa, vdev_t *vd); extern boolean_t vdev_is_dead(vdev_t *vd); @@ -190,6 +191,8 @@ typedef enum vdev_config_flag { VDEV_CONFIG_MISSING = 1 << 4 } vdev_config_flag_t; +extern void vdev_post_kobj_evt(vdev_t *vd); +extern void vdev_clear_kobj_evt(vdev_t *vd); extern void vdev_top_config_generate(spa_t *spa, nvlist_t *config); extern nvlist_t *vdev_config_generate(spa_t *spa, vdev_t *vd, boolean_t getstats, vdev_config_flag_t flags); |