Annotated dprintf as printf-like

ZFS loves using %llu for uint64_t, but that requires a cast to not 
be noisy - which is even done in many, though not all, places.
Also a couple places used %u for uint64_t, which were promoted
to %llu. 

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12233
This commit is contained in:
Rich Ercolani
2021-06-23 00:53:45 -04:00
committed by GitHub
parent a81b812495
commit 8e739b2c9f
34 changed files with 256 additions and 166 deletions
+5 -3
View File
@@ -221,7 +221,8 @@ zap_table_grow(zap_t *zap, zap_table_phys_t *tbl,
tbl->zt_blks_copied++;
dprintf("copied block %llu of %llu\n",
tbl->zt_blks_copied, tbl->zt_numblks);
(u_longlong_t)tbl->zt_blks_copied,
(u_longlong_t)tbl->zt_numblks);
if (tbl->zt_blks_copied == tbl->zt_numblks) {
(void) dmu_free_range(zap->zap_objset, zap->zap_object,
@@ -234,7 +235,7 @@ zap_table_grow(zap_t *zap, zap_table_phys_t *tbl,
tbl->zt_blks_copied = 0;
dprintf("finished; numblocks now %llu (%uk entries)\n",
tbl->zt_numblks, 1<<(tbl->zt_shift-10));
(u_longlong_t)tbl->zt_numblks, 1<<(tbl->zt_shift-10));
}
return (0);
@@ -249,7 +250,8 @@ zap_table_store(zap_t *zap, zap_table_phys_t *tbl, uint64_t idx, uint64_t val,
ASSERT(RW_LOCK_HELD(&zap->zap_rwlock));
ASSERT(tbl->zt_blk != 0);
dprintf("storing %llx at index %llx\n", val, idx);
dprintf("storing %llx at index %llx\n", (u_longlong_t)val,
(u_longlong_t)idx);
uint64_t blk = idx >> (bs-3);
uint64_t off = idx & ((1<<(bs-3))-1);