summaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu_recv.c
diff options
context:
space:
mode:
authorRich Ercolani <[email protected]>2021-06-23 00:53:45 -0400
committerGitHub <[email protected]>2021-06-22 21:53:45 -0700
commit8e739b2c9ff446457ad04f63a3ee127ded70b996 (patch)
treecb8aed16bf38ded6d8018b2671b70c2b5741c595 /module/zfs/dmu_recv.c
parenta81b812495a20623a49c797d255ee5d89fc38790 (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/dmu_recv.c')
-rw-r--r--module/zfs/dmu_recv.c44
1 files changed, 28 insertions, 16 deletions
diff --git a/module/zfs/dmu_recv.c b/module/zfs/dmu_recv.c
index a713e1329..0ec46bdb4 100644
--- a/module/zfs/dmu_recv.c
+++ b/module/zfs/dmu_recv.c
@@ -2588,8 +2588,8 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
dprintf("drr_type = OBJECT obj = %llu type = %u "
"bonustype = %u blksz = %u bonuslen = %u cksumtype = %u "
"compress = %u dn_slots = %u err = %d\n",
- drro->drr_object, drro->drr_type, drro->drr_bonustype,
- drro->drr_blksz, drro->drr_bonuslen,
+ (u_longlong_t)drro->drr_object, drro->drr_type,
+ drro->drr_bonustype, drro->drr_blksz, drro->drr_bonuslen,
drro->drr_checksumtype, drro->drr_compress,
drro->drr_dn_slots, err);
break;
@@ -2600,7 +2600,8 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
&rrd->header.drr_u.drr_freeobjects;
dprintf("drr_type = FREEOBJECTS firstobj = %llu "
"numobjs = %llu err = %d\n",
- drrfo->drr_firstobj, drrfo->drr_numobjs, err);
+ (u_longlong_t)drrfo->drr_firstobj,
+ (u_longlong_t)drrfo->drr_numobjs, err);
break;
}
case DRR_WRITE:
@@ -2609,10 +2610,12 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
dprintf("drr_type = WRITE obj = %llu type = %u offset = %llu "
"lsize = %llu cksumtype = %u flags = %u "
"compress = %u psize = %llu err = %d\n",
- drrw->drr_object, drrw->drr_type, drrw->drr_offset,
- drrw->drr_logical_size, drrw->drr_checksumtype,
- drrw->drr_flags, drrw->drr_compressiontype,
- drrw->drr_compressed_size, err);
+ (u_longlong_t)drrw->drr_object, drrw->drr_type,
+ (u_longlong_t)drrw->drr_offset,
+ (u_longlong_t)drrw->drr_logical_size,
+ drrw->drr_checksumtype, drrw->drr_flags,
+ drrw->drr_compressiontype,
+ (u_longlong_t)drrw->drr_compressed_size, err);
break;
}
case DRR_WRITE_BYREF:
@@ -2623,11 +2626,14 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
"length = %llu toguid = %llx refguid = %llx "
"refobject = %llu refoffset = %llu cksumtype = %u "
"flags = %u err = %d\n",
- drrwbr->drr_object, drrwbr->drr_offset,
- drrwbr->drr_length, drrwbr->drr_toguid,
- drrwbr->drr_refguid, drrwbr->drr_refobject,
- drrwbr->drr_refoffset, drrwbr->drr_checksumtype,
- drrwbr->drr_flags, err);
+ (u_longlong_t)drrwbr->drr_object,
+ (u_longlong_t)drrwbr->drr_offset,
+ (u_longlong_t)drrwbr->drr_length,
+ (u_longlong_t)drrwbr->drr_toguid,
+ (u_longlong_t)drrwbr->drr_refguid,
+ (u_longlong_t)drrwbr->drr_refobject,
+ (u_longlong_t)drrwbr->drr_refoffset,
+ drrwbr->drr_checksumtype, drrwbr->drr_flags, err);
break;
}
case DRR_WRITE_EMBEDDED:
@@ -2637,7 +2643,9 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
dprintf("drr_type = WRITE_EMBEDDED obj = %llu offset = %llu "
"length = %llu compress = %u etype = %u lsize = %u "
"psize = %u err = %d\n",
- drrwe->drr_object, drrwe->drr_offset, drrwe->drr_length,
+ (u_longlong_t)drrwe->drr_object,
+ (u_longlong_t)drrwe->drr_offset,
+ (u_longlong_t)drrwe->drr_length,
drrwe->drr_compression, drrwe->drr_etype,
drrwe->drr_lsize, drrwe->drr_psize, err);
break;
@@ -2647,7 +2655,9 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
struct drr_free *drrf = &rrd->header.drr_u.drr_free;
dprintf("drr_type = FREE obj = %llu offset = %llu "
"length = %lld err = %d\n",
- drrf->drr_object, drrf->drr_offset, drrf->drr_length,
+ (u_longlong_t)drrf->drr_object,
+ (u_longlong_t)drrf->drr_offset,
+ (longlong_t)drrf->drr_length,
err);
break;
}
@@ -2655,7 +2665,8 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
{
struct drr_spill *drrs = &rrd->header.drr_u.drr_spill;
dprintf("drr_type = SPILL obj = %llu length = %llu "
- "err = %d\n", drrs->drr_object, drrs->drr_length, err);
+ "err = %d\n", (u_longlong_t)drrs->drr_object,
+ (u_longlong_t)drrs->drr_length, err);
break;
}
case DRR_OBJECT_RANGE:
@@ -2664,7 +2675,8 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
&rrd->header.drr_u.drr_object_range;
dprintf("drr_type = OBJECT_RANGE firstobj = %llu "
"numslots = %llu flags = %u err = %d\n",
- drror->drr_firstobj, drror->drr_numslots,
+ (u_longlong_t)drror->drr_firstobj,
+ (u_longlong_t)drror->drr_numslots,
drror->drr_flags, err);
break;
}