]> git.proxmox.com Git - mirror_zfs.git/commit
ddt: rework ops interface in terms of keys and values
authorRob Norris <rob.norris@klarasystems.com>
Mon, 3 Jul 2023 13:28:46 +0000 (23:28 +1000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 15 Feb 2024 19:45:38 +0000 (11:45 -0800)
commit9029278dde70a85f720e7a75f4c6f69dcd25ee0f
treecb84564e4b9127df3836650bcbd6f44e70f7ce63
parent5ee0f9c64946fca90026c0d7092326755d75c2d7
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
include/sys/ddt_impl.h
module/Makefile.bsd
module/zfs/ddt.c
module/zfs/ddt_zap.c