HomeFreeBSD

Don't attempt trimming "hole" vdevs

Description

Don't attempt trimming "hole" vdevs

On zpools containing hole vdevs (e.g. removed log devices), the `zpool
trim` (and presumably zpool initialize) commands will attempt calling
their respective functions on "hole", which fails, as this is not a real
vdev.

Avoid this by removing HOLE vdevs in zpool_collect_leaves.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Niklas Haas <git@haasn.xyz>
Closes #10227

Details

Provenance
Niklas Haas <github-c6e1c8@haasn.xyz>Authored on Apr 21 2020, 4:29 PM
GitHub <noreply@github.com>Committed on Apr 21 2020, 4:29 PM
Parents
rG1f043c8be1bf: Fix zfs send progress reporting
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGa84c92f93364: Don't attempt trimming "hole" vdevs (authored by Niklas Haas <github-c6e1c8@haasn.xyz>).Apr 21 2020, 4:29 PM