aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRob Norris <[email protected]>2024-06-18 14:11:11 +1000
committerBrian Behlendorf <[email protected]>2024-08-16 12:01:41 -0700
commitd63f5d7e50b65c76d9a8b79db0b66ebb6a49742c (patch)
tree6ea55a44e300ad4e50ddac37c749737c9fe31cee /include
parent2b131d734577bf489c86fdb9dbb63460a5675613 (diff)
zdb: rework DDT block count and leak check to just count the blocks
The upcoming dedup features break the long held assumption that all blocks on disk with a 'D' dedup bit will always be present in the DDT, or will have the same set of DVA allocations on disk as in the DDT. If the DDT is no longer a complete picture of all the dedup blocks that will be and should be on disk, then it does us no good to walk and prime it up front, since it won't necessarily match up with every block we'll see anyway. Instead, we rework things here to be more like the BRT checks. When we see a dedup'd block, we look it up in the DDT, consume a refcount, and for the second-or-later instances, count them as duplicates. The DDT and BRT are moved ahead of the space accounting. This will become important for the "flat" feature, which may need to count a modified version of the block. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Allan Jude <[email protected]> Co-authored-by: Don Brady <[email protected]> Signed-off-by: Rob Norris <[email protected]> Sponsored-by: Klara, Inc. Sponsored-by: iXsystems, Inc. Closes #15892
Diffstat (limited to 'include')
-rw-r--r--include/sys/ddt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/ddt.h b/include/sys/ddt.h
index 02d0cf5da..20bae8ce0 100644
--- a/include/sys/ddt.h
+++ b/include/sys/ddt.h
@@ -253,7 +253,7 @@ extern void ddt_enter(ddt_t *ddt);
extern void ddt_exit(ddt_t *ddt);
extern void ddt_init(void);
extern void ddt_fini(void);
-extern ddt_entry_t *ddt_lookup(ddt_t *ddt, const blkptr_t *bp, boolean_t add);
+extern ddt_entry_t *ddt_lookup(ddt_t *ddt, const blkptr_t *bp);
extern void ddt_remove(ddt_t *ddt, ddt_entry_t *dde);
extern void ddt_prefetch(spa_t *spa, const blkptr_t *bp);
extern void ddt_prefetch_all(spa_t *spa);