HomeFreeBSD

ddt: rework access to phys array slots

Description

ddt: rework access to phys array slots

The "flat phys" feature will use only a single phys slot for all
entries, which means the old "single", "double" etc naming now makes no
sense, and more importantly, means that choosing the right slot for a
given block pointer will depend on how many slots are in use for a given
DDT.

This removes the old names, and adds accessor macros to decouple
specific phys array indexes from any particular meaning.

(These macros look strange in isolation, mainly in the way they take the
ddt_t* as an arg but don't use it. This is mostly a separate commit to
introduce the concept to the reader before the "flat phys" commit
extends it).

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Sponsored-by: Klara, Inc.
Sponsored-by: iXsystems, Inc.
Closes #15893

Details

Provenance
rob.norris_klarasystems.comAuthored on Jul 3 2023, 5:16 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Aug 16 2024, 7:02 PM
Parents
rGd63f5d7e50b6: zdb: rework DDT block count and leak check to just count the blocks
Branches
Unknown
Tags
Unknown