HomeFreeBSD

ddt: rework ops interface in terms of keys and values

Description

ddt: rework ops interface in terms of keys and values

Store objects store keys and values, so have them take those types and
nothing more. This way, they don't need to be concerned about the "kind"
of entry being operated on; the dispatch layer can take care of the
appropriate conversions.

This adds a "contains" op to see if a particular entry exists without
loading it, which makes a couple of things easier to do; in particular,
it allows us to avoid an allocation in ddt_class_contains().

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 #15887

Details

Provenance
rob.norris_klarasystems.comAuthored on Jul 3 2023, 1:28 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 15 2024, 7:45 PM
Parents
rG5ee0f9c64946: ddt: ensure ddt objects exist before trying to get stats from them
Branches
Unknown
Tags
Unknown