mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
DDT: Add/use zap_lookup_length_uint64_by_dnode()
Unlike other ZAP consumers due to compression DDT does not know how big entry it is reading from ZAP. Due to this it called zap_length_uint64_by_dnode() and zap_lookup_uint64_by_dnode(), each of which does full ZAP entry lookup. Introduction of the combined ZAP method dramatically reduces the CPU overhead and locks contention at DBUF layer. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18048
This commit is contained in:
committed by
Tony Hutter
parent
4905686e67
commit
4ab2027f59
+4
-1
@@ -878,7 +878,8 @@ fzap_check(zap_name_t *zn, uint64_t integer_size, uint64_t num_integers)
|
||||
int
|
||||
fzap_lookup(zap_name_t *zn,
|
||||
uint64_t integer_size, uint64_t num_integers, void *buf,
|
||||
char *realname, int rn_len, boolean_t *ncp)
|
||||
char *realname, int rn_len, boolean_t *ncp,
|
||||
uint64_t *actual_num_integers)
|
||||
{
|
||||
zap_leaf_t *l;
|
||||
zap_entry_handle_t zeh;
|
||||
@@ -898,6 +899,8 @@ fzap_lookup(zap_name_t *zn,
|
||||
}
|
||||
|
||||
err = zap_entry_read(&zeh, integer_size, num_integers, buf);
|
||||
if (err == 0 && actual_num_integers != NULL)
|
||||
*actual_num_integers = zeh.zeh_num_integers;
|
||||
(void) zap_entry_read_name(zn->zn_zap, &zeh, rn_len, realname);
|
||||
if (ncp) {
|
||||
*ncp = zap_entry_normalization_conflict(&zeh,
|
||||
|
||||
Reference in New Issue
Block a user