HomeFreeBSD

zpool: fix redundancy check after vdev removal

Description

zpool: fix redundancy check after vdev removal

The presence of indirect vdevs was confusing get_redundancy(), which
considered a pool with e.g. only mirror top-level vdevs and at least
one indirect vdev (due to the removal of a previous vdev) as already
having a broken redundancy, which is not the case. This lead to the
possibility of compromising the redundancy of a pool by adding
mismatched vdevs without requiring the use of -f, and with no
visible notice or warning.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Stéphane Lesimple <speed47_github@speed47.net>
Closes #13705
Closes #13711

Details

Provenance
Stéphane Lesimple <speed47_github@speed47.net>Authored on Aug 5 2022, 12:02 AM
GitHub <noreply@github.com>Committed on Aug 5 2022, 12:02 AM
Parents
rGc26045b43540: Linux 5.20 compat: blk_cleanup_disk()
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG4fc1ea9c6c20: zpool: fix redundancy check after vdev removal (authored by Stéphane Lesimple <speed47_github@speed47.net>).Aug 5 2022, 12:02 AM