mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Micro-optimize dsl_prop_get_dd()
Use the saved property index instead of looking it up once per DSL directory when traversing up towards the root. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Allan Jude <allan@klarasystems.com> Reviewed-by: Akash B <akash-b@hpe.com> Signed-off-by: Mark Johnston <markj@FreeBSD.org> Sponsored-by: The FreeBSD Foundation Closes #14397
This commit is contained in:
parent
7c30100c00
commit
ebabb93e6c
@ -123,7 +123,7 @@ dsl_prop_get_dd(dsl_dir_t *dd, const char *propname,
|
||||
/* Check for a iuv value. */
|
||||
err = zap_lookup(mos, dsl_dir_phys(dd)->dd_props_zapobj,
|
||||
iuvstr, intsz, numints, buf);
|
||||
if (err == 0 && dsl_prop_known_index(zfs_name_to_prop(propname),
|
||||
if (err == 0 && dsl_prop_known_index(prop,
|
||||
*(uint64_t *)buf) != 1)
|
||||
err = ENOENT;
|
||||
if (err != ENOENT) {
|
||||
|
Loading…
Reference in New Issue
Block a user