mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 19:57:43 +03:00
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:
+25
-15
@@ -2014,18 +2014,24 @@ zio_deadman_impl(zio_t *pio, int ziodepth)
|
||||
|
||||
zfs_dbgmsg("slow zio[%d]: zio=%px timestamp=%llu "
|
||||
"delta=%llu queued=%llu io=%llu "
|
||||
"path=%s last=%llu "
|
||||
"type=%d priority=%d flags=0x%x "
|
||||
"stage=0x%x pipeline=0x%x pipeline-trace=0x%x "
|
||||
"objset=%llu object=%llu level=%llu blkid=%llu "
|
||||
"offset=%llu size=%llu error=%d",
|
||||
"path=%s "
|
||||
"last=%llu type=%d "
|
||||
"priority=%d flags=0x%x stage=0x%x "
|
||||
"pipeline=0x%x pipeline-trace=0x%x "
|
||||
"objset=%llu object=%llu "
|
||||
"level=%llu blkid=%llu "
|
||||
"offset=%llu size=%llu "
|
||||
"error=%d",
|
||||
ziodepth, pio, pio->io_timestamp,
|
||||
delta, pio->io_delta, pio->io_delay,
|
||||
vd ? vd->vdev_path : "NULL", vq ? vq->vq_io_complete_ts : 0,
|
||||
pio->io_type, pio->io_priority, pio->io_flags,
|
||||
pio->io_stage, pio->io_pipeline, pio->io_pipeline_trace,
|
||||
zb->zb_objset, zb->zb_object, zb->zb_level, zb->zb_blkid,
|
||||
pio->io_offset, pio->io_size, pio->io_error);
|
||||
(u_longlong_t)delta, pio->io_delta, pio->io_delay,
|
||||
vd ? vd->vdev_path : "NULL",
|
||||
vq ? vq->vq_io_complete_ts : 0, pio->io_type,
|
||||
pio->io_priority, pio->io_flags, pio->io_stage,
|
||||
pio->io_pipeline, pio->io_pipeline_trace,
|
||||
(u_longlong_t)zb->zb_objset, (u_longlong_t)zb->zb_object,
|
||||
(u_longlong_t)zb->zb_level, (u_longlong_t)zb->zb_blkid,
|
||||
(u_longlong_t)pio->io_offset, (u_longlong_t)pio->io_size,
|
||||
pio->io_error);
|
||||
(void) zfs_ereport_post(FM_EREPORT_ZFS_DEADMAN,
|
||||
pio->io_spa, vd, zb, pio, 0);
|
||||
|
||||
@@ -3533,7 +3539,8 @@ zio_dva_allocate(zio_t *zio)
|
||||
if (zfs_flags & ZFS_DEBUG_METASLAB_ALLOC) {
|
||||
zfs_dbgmsg("%s: metaslab allocation failure, "
|
||||
"trying normal class: zio %px, size %llu, error %d",
|
||||
spa_name(spa), zio, zio->io_size, error);
|
||||
spa_name(spa), zio, (u_longlong_t)zio->io_size,
|
||||
error);
|
||||
}
|
||||
|
||||
error = metaslab_alloc(spa, mc, zio->io_size, bp,
|
||||
@@ -3545,7 +3552,8 @@ zio_dva_allocate(zio_t *zio)
|
||||
if (zfs_flags & ZFS_DEBUG_METASLAB_ALLOC) {
|
||||
zfs_dbgmsg("%s: metaslab allocation failure, "
|
||||
"trying ganging: zio %px, size %llu, error %d",
|
||||
spa_name(spa), zio, zio->io_size, error);
|
||||
spa_name(spa), zio, (u_longlong_t)zio->io_size,
|
||||
error);
|
||||
}
|
||||
return (zio_write_gang_block(zio, mc));
|
||||
}
|
||||
@@ -3554,7 +3562,8 @@ zio_dva_allocate(zio_t *zio)
|
||||
(zfs_flags & ZFS_DEBUG_METASLAB_ALLOC)) {
|
||||
zfs_dbgmsg("%s: metaslab allocation failure: zio %px, "
|
||||
"size %llu, error %d",
|
||||
spa_name(spa), zio, zio->io_size, error);
|
||||
spa_name(spa), zio, (u_longlong_t)zio->io_size,
|
||||
error);
|
||||
}
|
||||
zio->io_error = error;
|
||||
}
|
||||
@@ -3680,7 +3689,8 @@ zio_alloc_zil(spa_t *spa, objset_t *os, uint64_t txg, blkptr_t *new_bp,
|
||||
}
|
||||
} else {
|
||||
zfs_dbgmsg("%s: zil block allocation failure: "
|
||||
"size %llu, error %d", spa_name(spa), size, error);
|
||||
"size %llu, error %d", spa_name(spa), (u_longlong_t)size,
|
||||
error);
|
||||
}
|
||||
|
||||
return (error);
|
||||
|
||||
Reference in New Issue
Block a user