mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
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:
committed by
Tony Hutter
parent
fa857113a3
commit
4905686e67
@@ -288,6 +288,8 @@ int zap_length(objset_t *ds, uint64_t zapobj, const char *name,
|
||||
uint64_t *integer_size, uint64_t *num_integers);
|
||||
int zap_length_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key,
|
||||
int key_numints, uint64_t *integer_size, uint64_t *num_integers);
|
||||
int zap_length_uint64_by_dnode(dnode_t *dn, const uint64_t *key,
|
||||
int key_numints, uint64_t *integer_size, uint64_t *num_integers);
|
||||
|
||||
/*
|
||||
* Remove the specified attribute.
|
||||
@@ -309,6 +311,7 @@ int zap_remove_uint64_by_dnode(dnode_t *dn, const uint64_t *key,
|
||||
* object.
|
||||
*/
|
||||
int zap_count(objset_t *ds, uint64_t zapobj, uint64_t *count);
|
||||
int zap_count_by_dnode(dnode_t *dn, uint64_t *count);
|
||||
|
||||
/*
|
||||
* Returns (in name) the name of the entry whose (value & mask)
|
||||
|
||||
Reference in New Issue
Block a user