HomeFreeBSD

JSON: Fix class values for mirrored special vdevs

Description

JSON: Fix class values for mirrored special vdevs

This fixes things so mirrored special vdevs report themselves as
"class=special" rather than "class=normal".

This happens due to the way the vdev nvlists are constructed:

mirrored special devices - The 'mirror' vdev has allocation bias as
"special" and it's leaf vdevs are "normal"

single or RAID0 special devices - Leaf vdevs have allocation bias as
"special".

This commit adds in code to check if a leaf's parent is a "special"
vdev to see if it should also report "special".

Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Umer Saleem <usaleem@ixsystems.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #16217

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Jul 11 2024, 10:35 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Aug 6 2024, 7:47 PM
Parents
rGdab810014e36: ZTS: Add zfs/zpool JSON sanity tests
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG02a9f7fed7df: JSON: Fix class values for mirrored special vdevs (authored by Tony Hutter <hutter2@llnl.gov>).Aug 6 2024, 7:47 PM