diff options
author | Rich Ercolani <[email protected]> | 2021-06-23 00:53:45 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-22 21:53:45 -0700 |
commit | 8e739b2c9ff446457ad04f63a3ee127ded70b996 (patch) | |
tree | cb8aed16bf38ded6d8018b2671b70c2b5741c595 /module/zfs/arc.c | |
parent | a81b812495a20623a49c797d255ee5d89fc38790 (diff) |
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 <[email protected]>
Signed-off-by: Rich Ercolani <[email protected]>
Closes #12233
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r-- | module/zfs/arc.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index b0468159d..04d275dd8 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -7179,8 +7179,11 @@ arc_tempreserve_space(spa_t *spa, uint64_t reserve, uint64_t txg) zfs_refcount_count(&arc_anon->arcs_esize[ARC_BUFC_DATA]); dprintf("failing, arc_tempreserve=%lluK anon_meta=%lluK " "anon_data=%lluK tempreserve=%lluK rarc_c=%lluK\n", - arc_tempreserve >> 10, meta_esize >> 10, - data_esize >> 10, reserve >> 10, rarc_c >> 10); + (u_longlong_t)arc_tempreserve >> 10, + (u_longlong_t)meta_esize >> 10, + (u_longlong_t)data_esize >> 10, + (u_longlong_t)reserve >> 10, + (u_longlong_t)rarc_c >> 10); #endif DMU_TX_STAT_BUMP(dmu_tx_dirty_throttle); return (SET_ERROR(ERESTART)); @@ -10250,7 +10253,7 @@ out: * log as the pool may be in the process of being removed. */ zfs_dbgmsg("L2ARC rebuild aborted, restored %llu blocks", - zfs_refcount_count(&dev->l2ad_lb_count)); + (u_longlong_t)zfs_refcount_count(&dev->l2ad_lb_count)); } else if (err != 0) { spa_history_log_internal(spa, "L2ARC rebuild", NULL, "aborted, restored %llu blocks", @@ -10293,7 +10296,8 @@ l2arc_dev_hdr_read(l2arc_dev_t *dev) if (err != 0) { ARCSTAT_BUMP(arcstat_l2_rebuild_abort_dh_errors); zfs_dbgmsg("L2ARC IO error (%d) while reading device header, " - "vdev guid: %llu", err, dev->l2ad_vdev->vdev_guid); + "vdev guid: %llu", err, + (u_longlong_t)dev->l2ad_vdev->vdev_guid); return (err); } @@ -10390,8 +10394,9 @@ l2arc_log_blk_read(l2arc_dev_t *dev, if ((err = zio_wait(this_io)) != 0) { ARCSTAT_BUMP(arcstat_l2_rebuild_abort_io_errors); zfs_dbgmsg("L2ARC IO error (%d) while reading log block, " - "offset: %llu, vdev guid: %llu", err, this_lbp->lbp_daddr, - dev->l2ad_vdev->vdev_guid); + "offset: %llu, vdev guid: %llu", err, + (u_longlong_t)this_lbp->lbp_daddr, + (u_longlong_t)dev->l2ad_vdev->vdev_guid); goto cleanup; } @@ -10405,8 +10410,10 @@ l2arc_log_blk_read(l2arc_dev_t *dev, ARCSTAT_BUMP(arcstat_l2_rebuild_abort_cksum_lb_errors); zfs_dbgmsg("L2ARC log block cksum failed, offset: %llu, " "vdev guid: %llu, l2ad_hand: %llu, l2ad_evict: %llu", - this_lbp->lbp_daddr, dev->l2ad_vdev->vdev_guid, - dev->l2ad_hand, dev->l2ad_evict); + (u_longlong_t)this_lbp->lbp_daddr, + (u_longlong_t)dev->l2ad_vdev->vdev_guid, + (u_longlong_t)dev->l2ad_hand, + (u_longlong_t)dev->l2ad_evict); err = SET_ERROR(ECKSUM); goto cleanup; } @@ -10660,7 +10667,8 @@ l2arc_dev_hdr_update(l2arc_dev_t *dev) if (err != 0) { zfs_dbgmsg("L2ARC IO error (%d) while writing device header, " - "vdev guid: %llu", err, dev->l2ad_vdev->vdev_guid); + "vdev guid: %llu", err, + (u_longlong_t)dev->l2ad_vdev->vdev_guid); } } |