]> git.proxmox.com Git - mirror_zfs.git/commit
BRT: Skip getting length in brt_entry_lookup()
authorAlexander Motin <mav@FreeBSD.org>
Tue, 26 Mar 2024 00:13:45 +0000 (20:13 -0400)
committerGitHub <noreply@github.com>
Tue, 26 Mar 2024 00:13:45 +0000 (17:13 -0700)
commit8cd8ccca5383dcdd9bf55d4d22921a6b43b4ebe1
treef5c0bc1ef5e9040249285ed3af820bbc029d1286
parentc6be6ce1755a3d9a3cbe70256cd8958ef83d8542
BRT: Skip getting length in brt_entry_lookup()

Unlike DDT, where ZAP values may have different lengths due to
compression, all BRT entries are identical 8-byte counters.  It
does not make sense to first fetch the length only to assert it.
zap_lookup_uint64() is specifically designed to work with counters
of different size and should return error if something odd found.
Calling it straight allows to save some measurable CPU time.

Reviewed-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15950
module/zfs/brt.c