DDT: Switch to using ZAP _by_dnode() interfaces

As was previously done for BRT, avoid holding/releasing DDT ZAP
dnodes for every access.  Instead hold the dnodes during all their
life time, never releasing.

While at this, add _by_dnode() interfaces for zap_length_uint64()
and zap_count(), actively used by DDT code.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #18047
This commit is contained in:
Alexander Motin
2025-12-15 12:49:14 -05:00
committed by GitHub
parent 46d6f1fe56
commit ff5414406f
6 changed files with 132 additions and 63 deletions
+1
View File
@@ -326,6 +326,7 @@ typedef struct {
/* per-type/per-class entry store objects */
uint64_t ddt_object[DDT_TYPES][DDT_CLASSES];
dnode_t *ddt_object_dnode[DDT_TYPES][DDT_CLASSES];
/* object ids for stored, logged and per-type/per-class stats */
uint64_t ddt_stat_object;