aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorMark Johnston <[email protected]>2023-01-16 07:53:16 -0500
committerBrian Behlendorf <[email protected]>2023-01-20 11:01:41 -0800
commitebabb93e6c6e1849173206874a1543d8161225ab (patch)
tree132162f02704dffd98d187709dbb97d8ae6d3927 /module
parent7c30100c0047a0a3f489e28197cb641fc1a6f737 (diff)
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 <[email protected]> Reviewed-by: Igor Kozhukhov <[email protected]> Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Akash B <[email protected]> Signed-off-by: Mark Johnston <[email protected]> Sponsored-by: The FreeBSD Foundation Closes #14397
Diffstat (limited to 'module')
-rw-r--r--module/zfs/dsl_prop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/dsl_prop.c b/module/zfs/dsl_prop.c
index 57ff3b10d..a1e73f97e 100644
--- a/module/zfs/dsl_prop.c
+++ b/module/zfs/dsl_prop.c
@@ -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) {