aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorAlexander Motin <[email protected]>2023-07-14 19:11:46 -0400
committerGitHub <[email protected]>2023-07-14 16:11:46 -0700
commitfdba8cbb796cb089c3d6eefa833f5176b0474c29 (patch)
tree1b8bdce2c9f48b3bc99bbb17ebefa4b4f16f677e /module
parent6db781d52ca0993af42e9ecb6741263167b991e0 (diff)
Avoid extra snprintf() in dsl_deadlist_merge().
Since we are already iterating the ZAP, we have exact string key to remove, we do not need to call zap_remove_int() with the int key we just converted, we can call zap_remove() for the original string. This should make no functional change, only a micro-optimization. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc. Closes #15056
Diffstat (limited to 'module')
-rw-r--r--module/zfs/dsl_deadlist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/dsl_deadlist.c b/module/zfs/dsl_deadlist.c
index 181efd8ed..47c234f76 100644
--- a/module/zfs/dsl_deadlist.c
+++ b/module/zfs/dsl_deadlist.c
@@ -892,9 +892,9 @@ dsl_deadlist_merge(dsl_deadlist_t *dl, uint64_t obj, dmu_tx_t *tx)
for (zap_cursor_init(&zc, dl->dl_os, obj);
(error = zap_cursor_retrieve(&zc, za)) == 0;
zap_cursor_advance(&zc)) {
- uint64_t mintxg = zfs_strtonum(za->za_name, NULL);
- dsl_deadlist_insert_bpobj(dl, za->za_first_integer, mintxg, tx);
- VERIFY0(zap_remove_int(dl->dl_os, obj, mintxg, tx));
+ dsl_deadlist_insert_bpobj(dl, za->za_first_integer,
+ zfs_strtonum(za->za_name, NULL), tx);
+ VERIFY0(zap_remove(dl->dl_os, obj, za->za_name, tx));
if (perror == 0) {
dsl_deadlist_prefetch_bpobj(dl, pza->za_first_integer,
zfs_strtonum(pza->za_name, NULL));