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 <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #15056
This commit is contained in:
parent
6db781d52c
commit
fdba8cbb79
|
@ -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);
|
for (zap_cursor_init(&zc, dl->dl_os, obj);
|
||||||
(error = zap_cursor_retrieve(&zc, za)) == 0;
|
(error = zap_cursor_retrieve(&zc, za)) == 0;
|
||||||
zap_cursor_advance(&zc)) {
|
zap_cursor_advance(&zc)) {
|
||||||
uint64_t mintxg = zfs_strtonum(za->za_name, NULL);
|
dsl_deadlist_insert_bpobj(dl, za->za_first_integer,
|
||||||
dsl_deadlist_insert_bpobj(dl, za->za_first_integer, mintxg, tx);
|
zfs_strtonum(za->za_name, NULL), tx);
|
||||||
VERIFY0(zap_remove_int(dl->dl_os, obj, mintxg, tx));
|
VERIFY0(zap_remove(dl->dl_os, obj, za->za_name, tx));
|
||||||
if (perror == 0) {
|
if (perror == 0) {
|
||||||
dsl_deadlist_prefetch_bpobj(dl, pza->za_first_integer,
|
dsl_deadlist_prefetch_bpobj(dl, pza->za_first_integer,
|
||||||
zfs_strtonum(pza->za_name, NULL));
|
zfs_strtonum(pza->za_name, NULL));
|
||||||
|
|
Loading…
Reference in New Issue