Skip to content

Commit 63c8f7c

Browse files
committed
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 openzfs#15056 (cherry picked from commit fdba8cb)
1 parent 79b0df3 commit 63c8f7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

module/zfs/dsl_deadlist.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -892,9 +892,9 @@ dsl_deadlist_merge(dsl_deadlist_t *dl, uint64_t obj, dmu_tx_t *tx)
892892
for (zap_cursor_init(&zc, dl->dl_os, obj);
893893
(error = zap_cursor_retrieve(&zc, za)) == 0;
894894
zap_cursor_advance(&zc)) {
895-
uint64_t mintxg = zfs_strtonum(za->za_name, NULL);
896-
dsl_deadlist_insert_bpobj(dl, za->za_first_integer, mintxg, tx);
897-
VERIFY0(zap_remove_int(dl->dl_os, obj, mintxg, tx));
895+
dsl_deadlist_insert_bpobj(dl, za->za_first_integer,
896+
zfs_strtonum(za->za_name, NULL), tx);
897+
VERIFY0(zap_remove(dl->dl_os, obj, za->za_name, tx));
898898
if (perror == 0) {
899899
dsl_deadlist_prefetch_bpobj(dl, pza->za_first_integer,
900900
zfs_strtonum(pza->za_name, NULL));

0 commit comments

Comments
 (0)