diff options
34 files changed, 256 insertions, 166 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index 73694b0b3..a580396eb 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -6669,7 +6669,7 @@ ztest_initialize(ztest_ds_t *zd, uint64_t id) char *path = strdup(rand_vd->vdev_path); boolean_t active = rand_vd->vdev_initialize_thread != NULL; - zfs_dbgmsg("vd %px, guid %llu", rand_vd, guid); + zfs_dbgmsg("vd %px, guid %llu", rand_vd, (u_longlong_t)guid); spa_config_exit(spa, SCL_VDEV, FTAG); uint64_t cmd = ztest_random(POOL_INITIALIZE_FUNCS); @@ -6741,7 +6741,7 @@ ztest_trim(ztest_ds_t *zd, uint64_t id) char *path = strdup(rand_vd->vdev_path); boolean_t active = rand_vd->vdev_trim_thread != NULL; - zfs_dbgmsg("vd %p, guid %llu", rand_vd, guid); + zfs_dbgmsg("vd %p, guid %llu", rand_vd, (u_longlong_t)guid); spa_config_exit(spa, SCL_VDEV, FTAG); uint64_t cmd = ztest_random(POOL_TRIM_FUNCS); diff --git a/include/sys/zfs_debug.h b/include/sys/zfs_debug.h index 8b9629fb5..7b103510d 100644 --- a/include/sys/zfs_debug.h +++ b/include/sys/zfs_debug.h @@ -61,7 +61,7 @@ extern int zfs_dbgmsg_enable; extern void __set_error(const char *file, const char *func, int line, int err); extern void __zfs_dbgmsg(char *buf); extern void __dprintf(boolean_t dprint, const char *file, const char *func, - int line, const char *fmt, ...); + int line, const char *fmt, ...) __attribute__((format(printf, 5, 6))); /* * Some general principles for using zfs_dbgmsg(): diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c index 836eb176e..b6d836f41 100644 --- a/lib/libzpool/kernel.c +++ b/lib/libzpool/kernel.c @@ -788,7 +788,7 @@ kernel_init(int mode) physmem = sysconf(_SC_PHYS_PAGES); - dprintf("physmem = %llu pages (%.2f GB)\n", physmem, + dprintf("physmem = %llu pages (%.2f GB)\n", (u_longlong_t)physmem, (double)physmem * sysconf(_SC_PAGE_SIZE) / (1ULL << 30)); (void) snprintf(hw_serial, sizeof (hw_serial), "%ld", diff --git a/module/os/freebsd/zfs/zfs_debug.c b/module/os/freebsd/zfs/zfs_debug.c index 7239db808..dad342b06 100644 --- a/module/os/freebsd/zfs/zfs_debug.c +++ b/module/os/freebsd/zfs/zfs_debug.c @@ -181,7 +181,7 @@ __set_error(const char *file, const char *func, int line, int err) * $ echo 512 >/sys/module/zfs/parameters/zfs_flags */ if (zfs_flags & ZFS_DEBUG_SET_ERROR) - __dprintf(B_FALSE, file, func, line, "error %lu", err); + __dprintf(B_FALSE, file, func, line, "error %lu", (ulong_t)err); } #ifdef _KERNEL diff --git a/module/os/freebsd/zfs/zfs_vfsops.c b/module/os/freebsd/zfs/zfs_vfsops.c index 4e22206de..42e11eeb1 100644 --- a/module/os/freebsd/zfs/zfs_vfsops.c +++ b/module/os/freebsd/zfs/zfs_vfsops.c @@ -1060,7 +1060,7 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t mounting) &zfsvfs->z_kstat, zs.zs_num_entries); dprintf_ds(zfsvfs->z_os->os_dsl_dataset, "num_entries in unlinked set: %llu", - zs.zs_num_entries); + (u_longlong_t)zs.zs_num_entries); } zfs_unlinked_drain(zfsvfs); @@ -1874,7 +1874,9 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp) gen_mask = -1ULL >> (64 - 8 * i); - dprintf("getting %llu [%u mask %llx]\n", object, fid_gen, gen_mask); + dprintf("getting %llu [%llu mask %llx]\n", (u_longlong_t)object, + (u_longlong_t)fid_gen, + (u_longlong_t)gen_mask); if ((err = zfs_zget(zfsvfs, object, &zp))) { ZFS_EXIT(zfsvfs); return (err); @@ -1885,7 +1887,8 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp) if (zp_gen == 0) zp_gen = 1; if (zp->z_unlinked || zp_gen != fid_gen) { - dprintf("znode gen (%u) != fid gen (%u)\n", zp_gen, fid_gen); + dprintf("znode gen (%llu) != fid gen (%llu)\n", + (u_longlong_t)zp_gen, (u_longlong_t)fid_gen); vrele(ZTOV(zp)); ZFS_EXIT(zfsvfs); return (SET_ERROR(EINVAL)); diff --git a/module/os/linux/zfs/zfs_debug.c b/module/os/linux/zfs/zfs_debug.c index 8d7f04097..98c9923d5 100644 --- a/module/os/linux/zfs/zfs_debug.c +++ b/module/os/linux/zfs/zfs_debug.c @@ -127,7 +127,8 @@ __set_error(const char *file, const char *func, int line, int err) * $ echo 512 >/sys/module/zfs/parameters/zfs_flags */ if (zfs_flags & ZFS_DEBUG_SET_ERROR) - __dprintf(B_FALSE, file, func, line, "error %lu", err); + __dprintf(B_FALSE, file, func, line, "error %lu", + (ulong_t)err); } void 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); } } diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c index cbc6b2ffb..f9bcd9313 100644 --- a/module/zfs/dbuf.c +++ b/module/zfs/dbuf.c @@ -1848,7 +1848,8 @@ dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid, if (end_blkid > dn->dn_maxblkid && !(start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID)) end_blkid = dn->dn_maxblkid; - dprintf_dnode(dn, "start=%llu end=%llu\n", start_blkid, end_blkid); + dprintf_dnode(dn, "start=%llu end=%llu\n", (u_longlong_t)start_blkid, + (u_longlong_t)end_blkid); db_search = kmem_alloc(sizeof (dmu_buf_impl_t), KM_SLEEP); db_search->db_level = 0; diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c index 8c244dc4c..22deee7f3 100644 --- a/module/zfs/dmu_objset.c +++ b/module/zfs/dmu_objset.c @@ -1616,7 +1616,7 @@ dmu_objset_sync(objset_t *os, zio_t *pio, dmu_tx_t *tx) blkptr_t *blkptr_copy = kmem_alloc(sizeof (*os->os_rootbp), KM_SLEEP); *blkptr_copy = *os->os_rootbp; - dprintf_ds(os->os_dsl_dataset, "txg=%llu\n", tx->tx_txg); + dprintf_ds(os->os_dsl_dataset, "txg=%llu\n", (u_longlong_t)tx->tx_txg); ASSERT(dmu_tx_is_syncing(tx)); /* XXX the write_done callback should really give us the tx... */ 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; } diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c index 73667915d..0beb983f9 100644 --- a/module/zfs/dmu_tx.c +++ b/module/zfs/dmu_tx.c @@ -613,7 +613,8 @@ dmu_tx_dirty_buf(dmu_tx_t *tx, dmu_buf_impl_t *db) /* XXX txh_arg2 better not be zero... */ dprintf("found txh type %x beginblk=%llx endblk=%llx\n", - txh->txh_type, beginblk, endblk); + txh->txh_type, (u_longlong_t)beginblk, + (u_longlong_t)endblk); switch (txh->txh_type) { case THT_WRITE: diff --git a/module/zfs/dnode.c b/module/zfs/dnode.c index 8434e72aa..b1813a895 100644 --- a/module/zfs/dnode.c +++ b/module/zfs/dnode.c @@ -592,7 +592,8 @@ dnode_allocate(dnode_t *dn, dmu_object_type_t ot, int blocksize, int ibs, ibs = MIN(MAX(ibs, DN_MIN_INDBLKSHIFT), DN_MAX_INDBLKSHIFT); dprintf("os=%p obj=%llu txg=%llu blocksize=%d ibs=%d dn_slots=%d\n", - dn->dn_objset, dn->dn_object, tx->tx_txg, blocksize, ibs, dn_slots); + dn->dn_objset, (u_longlong_t)dn->dn_object, + (u_longlong_t)tx->tx_txg, blocksize, ibs, dn_slots); DNODE_STAT_BUMP(dnode_allocate); ASSERT(dn->dn_type == DMU_OT_NONE); @@ -1690,7 +1691,7 @@ dnode_setdirty(dnode_t *dn, dmu_tx_t *tx) ASSERT0(dn->dn_next_bonustype[txg & TXG_MASK]); dprintf_ds(os->os_dsl_dataset, "obj=%llu txg=%llu\n", - dn->dn_object, txg); + (u_longlong_t)dn->dn_object, (u_longlong_t)txg); multilist_sublist_insert_head(mls, dn); @@ -2253,7 +2254,8 @@ done: range_tree_add(dn->dn_free_ranges[txgoff], blkid, nblks); } dprintf_dnode(dn, "blkid=%llu nblks=%llu txg=%llu\n", - blkid, nblks, tx->tx_txg); + (u_longlong_t)blkid, (u_longlong_t)nblks, + (u_longlong_t)tx->tx_txg); mutex_exit(&dn->dn_mtx); dbuf_free_range(dn, blkid, blkid + nblks - 1, tx); diff --git a/module/zfs/dnode_sync.c b/module/zfs/dnode_sync.c index 66e48a1e1..dd37e3af7 100644 --- a/module/zfs/dnode_sync.c +++ b/module/zfs/dnode_sync.c @@ -59,7 +59,7 @@ dnode_increase_indirection(dnode_t *dn, dmu_tx_t *tx) dn->dn_phys->dn_nlevels = new_level; dprintf("os=%p obj=%llu, increase to %d\n", dn->dn_objset, - dn->dn_object, dn->dn_phys->dn_nlevels); + (u_longlong_t)dn->dn_object, dn->dn_phys->dn_nlevels); /* * Lock ordering requires that we hold the children's db_mutexes (by @@ -136,7 +136,8 @@ free_blocks(dnode_t *dn, blkptr_t *bp, int num, dmu_tx_t *tx) dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset; uint64_t bytesfreed = 0; - dprintf("ds=%p obj=%llx num=%d\n", ds, dn->dn_object, num); + dprintf("ds=%p obj=%llx num=%d\n", ds, (u_longlong_t)dn->dn_object, + num); for (int i = 0; i < num; i++, bp++) { if (BP_IS_HOLE(bp)) diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c index 9b9bb4228..1c03216ef 100644 --- a/module/zfs/dsl_dataset.c +++ b/module/zfs/dsl_dataset.c @@ -282,7 +282,7 @@ dsl_dataset_block_kill(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx, if (bp->blk_birth > dsl_dataset_phys(ds)->ds_prev_snap_txg) { int64_t delta; - dprintf_bp(bp, "freeing ds=%llu", ds->ds_object); + dprintf_bp(bp, "freeing ds=%llu", (u_longlong_t)ds->ds_object); dsl_free(tx->tx_pool, tx->tx_txg, bp); mutex_enter(&ds->ds_lock); @@ -721,7 +721,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uint64_t dsobj, void *tag, dsl_dataset_phys(ds)->ds_fsid_guid, (long long)ds->ds_fsid_guid, spa_name(dp->dp_spa), - dsobj); + (u_longlong_t)dsobj); } } } diff --git a/module/zfs/dsl_destroy.c b/module/zfs/dsl_destroy.c index 837d78987..a2748197f 100644 --- a/module/zfs/dsl_destroy.c +++ b/module/zfs/dsl_destroy.c @@ -654,7 +654,7 @@ dsl_destroy_snapshots_nvl(nvlist_t *snaps, boolean_t defer, char *errorstr = NULL; (void) nvlist_lookup_string(result, ZCP_RET_ERROR, &errorstr); if (errorstr != NULL) { - zfs_dbgmsg(errorstr); + zfs_dbgmsg("%s", errorstr); } fnvlist_free(wrapper); fnvlist_free(result); diff --git a/module/zfs/dsl_dir.c b/module/zfs/dsl_dir.c index 90dd78702..df2c3d8f0 100644 --- a/module/zfs/dsl_dir.c +++ b/module/zfs/dsl_dir.c @@ -488,7 +488,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char *name, void *tag, if (next[0] == '@') break; dprintf("looking up %s in obj%lld\n", - buf, dsl_dir_phys(dd)->dd_child_dir_zapobj); + buf, (longlong_t)dsl_dir_phys(dd)->dd_child_dir_zapobj); err = zap_lookup(dp->dp_meta_objset, dsl_dir_phys(dd)->dd_child_dir_zapobj, @@ -1156,8 +1156,8 @@ dsl_dir_sync(dsl_dir_t *dd, dmu_tx_t *tx) mutex_enter(&dd->dd_lock); ASSERT0(dd->dd_tempreserved[tx->tx_txg & TXG_MASK]); - dprintf_dd(dd, "txg=%llu towrite=%lluK\n", tx->tx_txg, - dd->dd_space_towrite[tx->tx_txg & TXG_MASK] / 1024); + dprintf_dd(dd, "txg=%llu towrite=%lluK\n", (u_longlong_t)tx->tx_txg, + (u_longlong_t)dd->dd_space_towrite[tx->tx_txg & TXG_MASK] / 1024); dd->dd_space_towrite[tx->tx_txg & TXG_MASK] = 0; mutex_exit(&dd->dd_lock); @@ -1344,8 +1344,9 @@ top_of_function: retval = ERESTART; dprintf_dd(dd, "failing: used=%lluK inflight = %lluK " "quota=%lluK tr=%lluK err=%d\n", - used_on_disk>>10, est_inflight>>10, - quota>>10, asize>>10, retval); + (u_longlong_t)used_on_disk>>10, + (u_longlong_t)est_inflight>>10, + (u_longlong_t)quota>>10, (u_longlong_t)asize>>10, retval); mutex_exit(&dd->dd_lock); DMU_TX_STAT_BUMP(dmu_tx_quota); return (SET_ERROR(retval)); diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c index 56bd7331c..36830ce5f 100644 --- a/module/zfs/metaslab.c +++ b/module/zfs/metaslab.c @@ -2437,18 +2437,20 @@ metaslab_load_impl(metaslab_t *msp) "loading_time %lld ms, ms_max_size %llu, " "max size error %lld, " "old_weight %llx, new_weight %llx", - spa_syncing_txg(spa), spa_name(spa), - msp->ms_group->mg_vd->vdev_id, msp->ms_id, - space_map_length(msp->ms_sm), - range_tree_space(msp->ms_unflushed_allocs), - range_tree_space(msp->ms_unflushed_frees), - range_tree_space(msp->ms_freed), - range_tree_space(msp->ms_defer[0]), - range_tree_space(msp->ms_defer[1]), + (u_longlong_t)spa_syncing_txg(spa), spa_name(spa), + (u_longlong_t)msp->ms_group->mg_vd->vdev_id, + (u_longlong_t)msp->ms_id, + (u_longlong_t)space_map_length(msp->ms_sm), + (u_longlong_t)range_tree_space(msp->ms_unflushed_allocs), + (u_longlong_t)range_tree_space(msp->ms_unflushed_frees), + (u_longlong_t)range_tree_space(msp->ms_freed), + (u_longlong_t)range_tree_space(msp->ms_defer[0]), + (u_longlong_t)range_tree_space(msp->ms_defer[1]), (longlong_t)((load_start - msp->ms_unload_time) / 1000000), (longlong_t)((load_end - load_start) / 1000000), - msp->ms_max_size, msp->ms_max_size - max_size, - weight, msp->ms_weight); + (u_longlong_t)msp->ms_max_size, + (u_longlong_t)msp->ms_max_size - max_size, + (u_longlong_t)weight, (u_longlong_t)msp->ms_weight); metaslab_verify_space(msp, spa_syncing_txg(spa)); mutex_exit(&msp->ms_sync_lock); @@ -2545,14 +2547,17 @@ metaslab_unload(metaslab_t *msp) "ms_id %llu, weight %llx, " "selected txg %llu (%llu ms ago), alloc_txg %llu, " "loaded %llu ms ago, max_size %llu", - spa_syncing_txg(spa), spa_name(spa), - msp->ms_group->mg_vd->vdev_id, msp->ms_id, - msp->ms_weight, - msp->ms_selected_txg, - (msp->ms_unload_time - msp->ms_selected_time) / 1000 / 1000, - msp->ms_alloc_txg, - (msp->ms_unload_time - msp->ms_load_time) / 1000 / 1000, - msp->ms_max_size); + (u_longlong_t)spa_syncing_txg(spa), spa_name(spa), + (u_longlong_t)msp->ms_group->mg_vd->vdev_id, + (u_longlong_t)msp->ms_id, + (u_longlong_t)msp->ms_weight, + (u_longlong_t)msp->ms_selected_txg, + (u_longlong_t)(msp->ms_unload_time - + msp->ms_selected_time) / 1000 / 1000, + (u_longlong_t)msp->ms_alloc_txg, + (u_longlong_t)(msp->ms_unload_time - + msp->ms_load_time) / 1000 / 1000, + (u_longlong_t)msp->ms_max_size); } /* @@ -2914,8 +2919,9 @@ metaslab_set_fragmentation(metaslab_t *msp, boolean_t nodirty) msp->ms_condense_wanted = B_TRUE; vdev_dirty(vd, VDD_METASLAB, msp, txg + 1); zfs_dbgmsg("txg %llu, requesting force condense: " - "ms_id %llu, vdev_id %llu", txg, msp->ms_id, - vd->vdev_id); + "ms_id %llu, vdev_id %llu", (u_longlong_t)txg, + (u_longlong_t)msp->ms_id, + (u_longlong_t)vd->vdev_id); } msp->ms_fragmentation = ZFS_FRAG_INVALID; return; @@ -3635,10 +3641,11 @@ metaslab_condense(metaslab_t *msp, dmu_tx_t *tx) ASSERT(range_tree_is_empty(msp->ms_freed)); /* since it is pass 1 */ zfs_dbgmsg("condensing: txg %llu, msp[%llu] %px, vdev id %llu, " - "spa %s, smp size %llu, segments %lu, forcing condense=%s", txg, - msp->ms_id, msp, msp->ms_group->mg_vd->vdev_id, - spa->spa_name, space_map_length(msp->ms_sm), - range_tree_numsegs(msp->ms_allocatable), + "spa %s, smp size %llu, segments %llu, forcing condense=%s", + (u_longlong_t)txg, (u_longlong_t)msp->ms_id, msp, + (u_longlong_t)msp->ms_group->mg_vd->vdev_id, + spa->spa_name, (u_longlong_t)space_map_length(msp->ms_sm), + (u_longlong_t)range_tree_numsegs(msp->ms_allocatable), msp->ms_condense_wanted ? "TRUE" : "FALSE"); msp->ms_condense_wanted = B_FALSE; @@ -3883,11 +3890,13 @@ metaslab_flush(metaslab_t *msp, dmu_tx_t *tx) if (zfs_flags & ZFS_DEBUG_LOG_SPACEMAP) { zfs_dbgmsg("flushing: txg %llu, spa %s, vdev_id %llu, " "ms_id %llu, unflushed_allocs %llu, unflushed_frees %llu, " - "appended %llu bytes", dmu_tx_get_txg(tx), spa_name(spa), - msp->ms_group->mg_vd->vdev_id, msp->ms_id, - range_tree_space(msp->ms_unflushed_allocs), - range_tree_space(msp->ms_unflushed_frees), - (sm_len_after - sm_len_before)); + "appended %llu bytes", (u_longlong_t)dmu_tx_get_txg(tx), + spa_name(spa), + (u_longlong_t)msp->ms_group->mg_vd->vdev_id, + (u_longlong_t)msp->ms_id, + (u_longlong_t)range_tree_space(msp->ms_unflushed_allocs), + (u_longlong_t)range_tree_space(msp->ms_unflushed_frees), + (u_longlong_t)(sm_len_after - sm_len_before)); } ASSERT3U(spa->spa_unflushed_stats.sus_memused, >=, diff --git a/module/zfs/mmp.c b/module/zfs/mmp.c index ba687c936..f67a4eb22 100644 --- a/module/zfs/mmp.c +++ b/module/zfs/mmp.c @@ -485,8 +485,9 @@ mmp_write_uberblock(spa_t *spa) if (mmp->mmp_skip_error != 0) { mmp->mmp_skip_error = 0; zfs_dbgmsg("MMP write after skipping due to unavailable " - "leaves, pool '%s' gethrtime %llu leaf %#llu", - spa_name(spa), gethrtime(), vd->vdev_guid); + "leaves, pool '%s' gethrtime %llu leaf %llu", + spa_name(spa), (u_longlong_t)gethrtime(), + (u_longlong_t)vd->vdev_guid); } if (mmp->mmp_zio_root == NULL) @@ -617,10 +618,11 @@ mmp_thread(void *arg) "mmp_interval %llu last_mmp_fail_intervals %u " "mmp_fail_intervals %u mmp_fail_ns %llu " "skip_wait %d leaves %d next_time %llu", - spa_name(spa), gethrtime(), last_mmp_interval, - mmp_interval, last_mmp_fail_intervals, - mmp_fail_intervals, mmp_fail_ns, skip_wait, leaves, - next_time); + spa_name(spa), (u_longlong_t)gethrtime(), + (u_longlong_t)last_mmp_interval, + (u_longlong_t)mmp_interval, last_mmp_fail_intervals, + mmp_fail_intervals, (u_longlong_t)mmp_fail_ns, + skip_wait, leaves, (u_longlong_t)next_time); } /* @@ -633,8 +635,9 @@ mmp_thread(void *arg) zfs_dbgmsg("MMP state change pool '%s': gethrtime %llu " "last_spa_multihost %u multihost %u " "last_spa_suspended %u suspended %u", - spa_name(spa), last_spa_multihost, multihost, - last_spa_suspended, suspended); + spa_name(spa), (u_longlong_t)gethrtime(), + last_spa_multihost, multihost, last_spa_suspended, + suspended); mutex_enter(&mmp->mmp_io_lock); mmp->mmp_last_write = gethrtime(); mmp->mmp_delay = mmp_interval; diff --git a/module/zfs/range_tree.c b/module/zfs/range_tree.c index 5219fd079..595918e5a 100644 --- a/module/zfs/range_tree.c +++ b/module/zfs/range_tree.c @@ -116,7 +116,8 @@ range_tree_stat_verify(range_tree_t *rt) for (i = 0; i < RANGE_TREE_HISTOGRAM_SIZE; i++) { if (hist[i] != rt->rt_histogram[i]) { zfs_dbgmsg("i=%d, hist=%px, hist=%llu, rt_hist=%llu", - i, hist, hist[i], rt->rt_histogram[i]); + i, hist, (u_longlong_t)hist[i], + (u_longlong_t)rt->rt_histogram[i]); } VERIFY3U(hist[i], ==, rt->rt_histogram[i]); } diff --git a/module/zfs/sa.c b/module/zfs/sa.c index 5af0aaa7d..2604a7513 100644 --- a/module/zfs/sa.c +++ b/module/zfs/sa.c @@ -1292,7 +1292,7 @@ sa_build_index(sa_handle_t *hdl, sa_buf_type_t buftype) mutex_exit(&sa->sa_lock); zfs_dbgmsg("Buffer Header: %x != SA_MAGIC:%x " "object=%#llx\n", sa_hdr_phys->sa_magic, SA_MAGIC, - db->db.db_object); + (u_longlong_t)db->db.db_object); return (SET_ERROR(EIO)); } sa_byteswap(hdl, buftype); diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 47fd75c0d..825e0f1cc 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -2578,8 +2578,9 @@ spa_livelist_delete_cb(void *arg, zthr_t *z) .to_free = &to_free }; zfs_dbgmsg("deleting sublist (id %llu) from" - " livelist %llu, %d remaining", - dle->dle_bpobj.bpo_object, ll_obj, count - 1); + " livelist %llu, %lld remaining", + (u_longlong_t)dle->dle_bpobj.bpo_object, + (u_longlong_t)ll_obj, (longlong_t)count - 1); VERIFY0(dsl_sync_task(spa_name(spa), NULL, sublist_delete_sync, &sync_arg, 0, ZFS_SPACE_CHECK_DESTROY)); @@ -2596,7 +2597,8 @@ spa_livelist_delete_cb(void *arg, zthr_t *z) .ll_obj = ll_obj, .zap_obj = zap_obj }; - zfs_dbgmsg("deletion of livelist %llu completed", ll_obj); + zfs_dbgmsg("deletion of livelist %llu completed", + (u_longlong_t)ll_obj); VERIFY0(dsl_sync_task(spa_name(spa), NULL, livelist_delete_sync, &sync_arg, 0, ZFS_SPACE_CHECK_DESTROY)); } @@ -2696,10 +2698,12 @@ spa_livelist_condense_sync(void *arg, dmu_tx_t *tx) dsl_dataset_name(ds, dsname); zfs_dbgmsg("txg %llu condensing livelist of %s (id %llu), bpobj %llu " "(%llu blkptrs) and bpobj %llu (%llu blkptrs) -> bpobj %llu " - "(%llu blkptrs)", tx->tx_txg, dsname, ds->ds_object, first_obj, - cur_first_size, next_obj, cur_next_size, - first->dle_bpobj.bpo_object, - first->dle_bpobj.bpo_phys->bpo_num_blkptrs); + "(%llu blkptrs)", (u_longlong_t)tx->tx_txg, dsname, + (u_longlong_t)ds->ds_object, (u_longlong_t)first_obj, + (u_longlong_t)cur_first_size, (u_longlong_t)next_obj, + (u_longlong_t)cur_next_size, + (u_longlong_t)first->dle_bpobj.bpo_object, + (u_longlong_t)first->dle_bpobj.bpo_phys->bpo_num_blkptrs); out: dmu_buf_rele(ds->ds_dbuf, spa); spa->spa_to_condense.ds = NULL; @@ -3091,8 +3095,10 @@ spa_activity_check_duration(spa_t *spa, uberblock_t *ub) zfs_dbgmsg("fail_intvals>0 import_delay=%llu ub_mmp " "mmp_fails=%llu ub_mmp mmp_interval=%llu " - "import_intervals=%u", import_delay, MMP_FAIL_INT(ub), - MMP_INTERVAL(ub), import_intervals); + "import_intervals=%llu", (u_longlong_t)import_delay, + (u_longlong_t)MMP_FAIL_INT(ub), + (u_longlong_t)MMP_INTERVAL(ub), + (u_longlong_t)import_intervals); } else if (MMP_INTERVAL_VALID(ub) && MMP_FAIL_INT_VALID(ub) && MMP_FAIL_INT(ub) == 0) { @@ -3103,8 +3109,10 @@ spa_activity_check_duration(spa_t *spa, uberblock_t *ub) zfs_dbgmsg("fail_intvals=0 import_delay=%llu ub_mmp " "mmp_interval=%llu ub_mmp_delay=%llu " - "import_intervals=%u", import_delay, MMP_INTERVAL(ub), - ub->ub_mmp_delay, import_intervals); + "import_intervals=%llu", (u_longlong_t)import_delay, + (u_longlong_t)MMP_INTERVAL(ub), + (u_longlong_t)ub->ub_mmp_delay, + (u_longlong_t)import_intervals); } else if (MMP_VALID(ub)) { /* @@ -3115,15 +3123,18 @@ spa_activity_check_duration(spa_t *spa, uberblock_t *ub) ub->ub_mmp_delay) * import_intervals); zfs_dbgmsg("import_delay=%llu ub_mmp_delay=%llu " - "import_intervals=%u leaves=%u", import_delay, - ub->ub_mmp_delay, import_intervals, + "import_intervals=%llu leaves=%u", + (u_longlong_t)import_delay, + (u_longlong_t)ub->ub_mmp_delay, + (u_longlong_t)import_intervals, vdev_count_leaves(spa)); } else { /* Using local tunings is the only reasonable option */ zfs_dbgmsg("pool last imported on non-MMP aware " "host using import_delay=%llu multihost_interval=%llu " - "import_intervals=%u", import_delay, multihost_interval, - import_intervals); + "import_intervals=%llu", (u_longlong_t)import_delay, + (u_longlong_t)multihost_interval, + (u_longlong_t)import_intervals); } return (import_delay); @@ -3191,8 +3202,11 @@ spa_activity_check(spa_t *spa, uberblock_t *ub, nvlist_t *config) "txg %llu ub_txg %llu " "timestamp %llu ub_timestamp %llu " "mmp_config %#llx ub_mmp_config %#llx", - txg, ub->ub_txg, timestamp, ub->ub_timestamp, - mmp_config, ub->ub_mmp_config); + (u_longlong_t)txg, (u_longlong_t)ub->ub_txg, + (u_longlong_t)timestamp, + (u_longlong_t)ub->ub_timestamp, + (u_longlong_t)mmp_config, + (u_longlong_t)ub->ub_mmp_config); error = SET_ERROR(EREMOTEIO); break; diff --git a/module/zfs/spa_checkpoint.c b/module/zfs/spa_checkpoint.c index 5fb614467..09f629968 100644 --- a/module/zfs/spa_checkpoint.c +++ b/module/zfs/spa_checkpoint.c @@ -337,17 +337,18 @@ spa_checkpoint_discard_thread_sync(void *arg, dmu_tx_t *tx) spa_checkpoint_accounting_verify(vd->vdev_spa); #endif - zfs_dbgmsg("discarding checkpoint: txg %llu, vdev id %d, " + zfs_dbgmsg("discarding checkpoint: txg %llu, vdev id %lld, " "deleted %llu words - %llu words are left", - tx->tx_txg, vd->vdev_id, (words_before - words_after), - words_after); + (u_longlong_t)tx->tx_txg, (longlong_t)vd->vdev_id, + (u_longlong_t)(words_before - words_after), + (u_longlong_t)words_after); if (error != EINTR) { if (error != 0) { - zfs_panic_recover("zfs: error %d was returned " + zfs_panic_recover("zfs: error %lld was returned " "while incrementally destroying the checkpoint " - "space map of vdev %llu\n", - error, vd->vdev_id); + "space map of vdev %u\n", + (longlong_t)error, vd->vdev_id); } ASSERT0(words_after); ASSERT0(space_map_allocated(vd->vdev_checkpoint_sm)); diff --git a/module/zfs/spa_history.c b/module/zfs/spa_history.c index 0482e0f6c..dae06e46c 100644 --- a/module/zfs/spa_history.c +++ b/module/zfs/spa_history.c @@ -296,14 +296,17 @@ spa_history_log_sync(void *arg, dmu_tx_t *tx) } else if (nvlist_exists(nvl, ZPOOL_HIST_INT_NAME)) { if (nvlist_exists(nvl, ZPOOL_HIST_DSNAME)) { zfs_dbgmsg("txg %lld %s %s (id %llu) %s", - fnvlist_lookup_uint64(nvl, ZPOOL_HIST_TXG), + (longlong_t)fnvlist_lookup_uint64(nvl, + ZPOOL_HIST_TXG), fnvlist_lookup_string(nvl, ZPOOL_HIST_INT_NAME), fnvlist_lookup_string(nvl, ZPOOL_HIST_DSNAME), - fnvlist_lookup_uint64(nvl, ZPOOL_HIST_DSID), + (u_longlong_t)fnvlist_lookup_uint64(nvl, + ZPOOL_HIST_DSID), fnvlist_lookup_string(nvl, ZPOOL_HIST_INT_STR)); } else { zfs_dbgmsg("txg %lld %s %s", - fnvlist_lookup_uint64(nvl, ZPOOL_HIST_TXG), + (longlong_t)fnvlist_lookup_uint64(nvl, + ZPOOL_HIST_TXG), fnvlist_lookup_string(nvl, ZPOOL_HIST_INT_NAME), fnvlist_lookup_string(nvl, ZPOOL_HIST_INT_STR)); } diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c index 77d891177..e2523231d 100644 --- a/module/zfs/spa_misc.c +++ b/module/zfs/spa_misc.c @@ -615,7 +615,7 @@ spa_deadman(void *arg) zfs_dbgmsg("slow spa_sync: started %llu seconds ago, calls %llu", (gethrtime() - spa->spa_sync_starttime) / NANOSEC, - ++spa->spa_deadman_calls); + (u_longlong_t)++spa->spa_deadman_calls); if (zfs_deadman_enabled) vdev_deadman(spa->spa_root_vdev, FTAG); diff --git a/module/zfs/space_map.c b/module/zfs/space_map.c index 28feb74b7..11d479892 100644 --- a/module/zfs/space_map.c +++ b/module/zfs/space_map.c @@ -877,9 +877,11 @@ space_map_truncate(space_map_t *sm, int blocksize, dmu_tx_t *tx) doi.doi_data_block_size != blocksize || doi.doi_metadata_block_size != 1 << space_map_ibs) { zfs_dbgmsg("txg %llu, spa %s, sm %px, reallocating " - "object[%llu]: old bonus %u, old blocksz %u", - dmu_tx_get_txg(tx), spa_name(spa), sm, sm->sm_object, - doi.doi_bonus_size, doi.doi_data_block_size); + "object[%llu]: old bonus %llu, old blocksz %u", + (u_longlong_t)dmu_tx_get_txg(tx), spa_name(spa), sm, + (u_longlong_t)sm->sm_object, + (u_longlong_t)doi.doi_bonus_size, + doi.doi_data_block_size); space_map_free(sm, tx); dmu_buf_rele(sm->sm_dbuf, sm); diff --git a/module/zfs/txg.c b/module/zfs/txg.c index 497e19dd5..c55b1d8f9 100644 --- a/module/zfs/txg.c +++ b/module/zfs/txg.c @@ -554,7 +554,8 @@ txg_sync_thread(void *arg) !txg_has_quiesced_to_sync(dp) && dp->dp_dirty_total < dirty_min_bytes) { dprintf("waiting; tx_synced=%llu waiting=%llu dp=%p\n", - tx->tx_synced_txg, tx->tx_sync_txg_waiting, dp); + (u_longlong_t)tx->tx_synced_txg, + (u_longlong_t)tx->tx_sync_txg_waiting, dp); txg_thread_wait(tx, &cpr, &tx->tx_sync_more_cv, timer); delta = ddi_get_lbolt() - start; timer = (delta > timeout ? 0 : timeout - delta); @@ -587,7 +588,8 @@ txg_sync_thread(void *arg) cv_broadcast(&tx->tx_quiesce_more_cv); dprintf("txg=%llu quiesce_txg=%llu sync_txg=%llu\n", - txg, tx->tx_quiesce_txg_waiting, tx->tx_sync_txg_waiting); + (u_longlong_t)txg, (u_longlong_t)tx->tx_quiesce_txg_waiting, + (u_longlong_t)tx->tx_sync_txg_waiting); mutex_exit(&tx->tx_sync_lock); txg_stat_t *ts = spa_txg_history_init_io(spa, txg, dp); @@ -638,8 +640,9 @@ txg_quiesce_thread(void *arg) txg = tx->tx_open_txg; dprintf("txg=%llu quiesce_txg=%llu sync_txg=%llu\n", - txg, tx->tx_quiesce_txg_waiting, - tx->tx_sync_txg_waiting); + (u_longlong_t)txg, + (u_longlong_t)tx->tx_quiesce_txg_waiting, + (u_longlong_t)tx->tx_sync_txg_waiting); tx->tx_quiescing_txg = txg; mutex_exit(&tx->tx_sync_lock); @@ -649,7 +652,8 @@ txg_quiesce_thread(void *arg) /* * Hand this txg off to the sync thread. */ - dprintf("quiesce done, handing off txg %llu\n", txg); + dprintf("quiesce done, handing off txg %llu\n", + (u_longlong_t)txg); tx->tx_quiescing_txg = 0; tx->tx_quiesced_txg = txg; DTRACE_PROBE2(txg__quiesced, dsl_pool_t *, dp, uint64_t, txg); @@ -705,11 +709,13 @@ txg_wait_synced_impl(dsl_pool_t *dp, uint64_t txg, boolean_t wait_sig) if (tx->tx_sync_txg_waiting < txg) tx->tx_sync_txg_waiting = txg; dprintf("txg=%llu quiesce_txg=%llu sync_txg=%llu\n", - txg, tx->tx_quiesce_txg_waiting, tx->tx_sync_txg_waiting); + (u_longlong_t)txg, (u_longlong_t)tx->tx_quiesce_txg_waiting, + (u_longlong_t)tx->tx_sync_txg_waiting); while (tx->tx_synced_txg < txg) { dprintf("broadcasting sync more " "tx_synced=%llu waiting=%llu dp=%px\n", - tx->tx_synced_txg, tx->tx_sync_txg_waiting, dp); + (u_longlong_t)tx->tx_synced_txg, + (u_longlong_t)tx->tx_sync_txg_waiting, dp); cv_broadcast(&tx->tx_sync_more_cv); if (wait_sig) { /* @@ -764,7 +770,8 @@ txg_wait_open(dsl_pool_t *dp, uint64_t txg, boolean_t should_quiesce) if (tx->tx_quiesce_txg_waiting < txg && should_quiesce) tx->tx_quiesce_txg_waiting = txg; dprintf("txg=%llu quiesce_txg=%llu sync_txg=%llu\n", - txg, tx->tx_quiesce_txg_waiting, tx->tx_sync_txg_waiting); + (u_longlong_t)txg, (u_longlong_t)tx->tx_quiesce_txg_waiting, + (u_longlong_t)tx->tx_sync_txg_waiting); while (tx->tx_open_txg < txg) { cv_broadcast(&tx->tx_quiesce_more_cv); /* diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index 5e14d71f1..4e316d813 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -165,7 +165,8 @@ vdev_dbgmsg_print_tree(vdev_t *vd, int indent) char state[20]; if (vd->vdev_ishole || vd->vdev_ops == &vdev_missing_ops) { - zfs_dbgmsg("%*svdev %u: %s", indent, "", vd->vdev_id, + zfs_dbgmsg("%*svdev %llu: %s", indent, "", + (u_longlong_t)vd->vdev_id, vd->vdev_ops->vdev_op_type); return; } @@ -5208,7 +5209,7 @@ vdev_deadman(vdev_t *vd, char *tag) zio_t *fio; uint64_t delta; - zfs_dbgmsg("slow vdev: %s has %d active IOs", + zfs_dbgmsg("slow vdev: %s has %lu active IOs", vd->vdev_path, avl_numnodes(&vq->vq_active_tree)); /* diff --git a/module/zfs/vdev_indirect.c b/module/zfs/vdev_indirect.c index 4a3346f3d..e476663ab 100644 --- a/module/zfs/vdev_indirect.c +++ b/module/zfs/vdev_indirect.c @@ -529,8 +529,9 @@ spa_condense_indirect_complete_sync(void *arg, dmu_tx_t *tx) zfs_dbgmsg("finished condense of vdev %llu in txg %llu: " "new mapping object %llu has %llu entries " "(was %llu entries)", - vd->vdev_id, dmu_tx_get_txg(tx), vic->vic_mapping_object, - new_count, old_count); + (u_longlong_t)vd->vdev_id, (u_longlong_t)dmu_tx_get_txg(tx), + (u_longlong_t)vic->vic_mapping_object, + (u_longlong_t)new_count, (u_longlong_t)old_count); vdev_config_dirty(spa->spa_root_vdev); } @@ -796,7 +797,7 @@ spa_condense_indirect_start_sync(vdev_t *vd, dmu_tx_t *tx) zfs_dbgmsg("starting condense of vdev %llu in txg %llu: " "posm=%llu nm=%llu", - vd->vdev_id, dmu_tx_get_txg(tx), + (u_longlong_t)vd->vdev_id, (u_longlong_t)dmu_tx_get_txg(tx), (u_longlong_t)scip->scip_prev_obsolete_sm_object, (u_longlong_t)scip->scip_next_mapping_object); diff --git a/module/zfs/vdev_removal.c b/module/zfs/vdev_removal.c index d7c0641c8..f762c1df9 100644 --- a/module/zfs/vdev_removal.c +++ b/module/zfs/vdev_removal.c @@ -345,8 +345,9 @@ vdev_remove_initiate_sync(void *arg, dmu_tx_t *tx) vdev_config_dirty(vd); zfs_dbgmsg("starting removal thread for vdev %llu (%px) in txg %llu " - "im_obj=%llu", vd->vdev_id, vd, dmu_tx_get_txg(tx), - vic->vic_mapping_object); + "im_obj=%llu", (u_longlong_t)vd->vdev_id, vd, + (u_longlong_t)dmu_tx_get_txg(tx), + (u_longlong_t)vic->vic_mapping_object); spa_history_log_internal(spa, "vdev remove started", tx, "%s vdev %llu %s", spa_name(spa), (u_longlong_t)vd->vdev_id, @@ -474,7 +475,8 @@ spa_restart_removal(spa_t *spa) if (!spa_writeable(spa)) return; - zfs_dbgmsg("restarting removal of %llu", svr->svr_vdev_id); + zfs_dbgmsg("restarting removal of %llu", + (u_longlong_t)svr->svr_vdev_id); svr->svr_thread = thread_create(NULL, 0, spa_vdev_remove_thread, spa, 0, &p0, TS_RUN, minclsyspri); } @@ -1196,7 +1198,7 @@ vdev_remove_complete(spa_t *spa) ESC_ZFS_VDEV_REMOVE_DEV); zfs_dbgmsg("finishing device removal for vdev %llu in txg %llu", - vd->vdev_id, txg); + (u_longlong_t)vd->vdev_id, (u_longlong_t)txg); /* * Discard allocation state. @@ -1490,8 +1492,9 @@ spa_vdev_remove_thread(void *arg) vca.vca_msp = msp; zfs_dbgmsg("copying %llu segments for metaslab %llu", - zfs_btree_numnodes(&svr->svr_allocd_segs->rt_root), - msp->ms_id); + (u_longlong_t)zfs_btree_numnodes( + &svr->svr_allocd_segs->rt_root), + (u_longlong_t)msp->ms_id); while (!svr->svr_thread_exit && !range_tree_is_empty(svr->svr_allocd_segs)) { @@ -1588,8 +1591,8 @@ spa_vdev_remove_thread(void *arg) vca.vca_write_error_bytes > 0)) { zfs_dbgmsg("canceling removal due to IO errors: " "[read_error_bytes=%llu] [write_error_bytes=%llu]", - vca.vca_read_error_bytes, - vca.vca_write_error_bytes); + (u_longlong_t)vca.vca_read_error_bytes, + (u_longlong_t)vca.vca_write_error_bytes); spa_vdev_remove_cancel_impl(spa); } } else { @@ -1761,7 +1764,7 @@ spa_vdev_remove_cancel_sync(void *arg, dmu_tx_t *tx) vdev_config_dirty(vd); zfs_dbgmsg("canceled device removal for vdev %llu in %llu", - vd->vdev_id, dmu_tx_get_txg(tx)); + (u_longlong_t)vd->vdev_id, (u_longlong_t)dmu_tx_get_txg(tx)); spa_history_log_internal(spa, "vdev remove canceled", tx, "%s vdev %llu %s", spa_name(spa), (u_longlong_t)vd->vdev_id, diff --git a/module/zfs/zap.c b/module/zfs/zap.c index c0c280c52..6f03beef3 100644 --- a/module/zfs/zap.c +++ b/module/zfs/zap.c @@ -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); diff --git a/module/zfs/zap_micro.c b/module/zfs/zap_micro.c index 5d9bc2076..b4611685b 100644 --- a/module/zfs/zap_micro.c +++ b/module/zfs/zap_micro.c @@ -563,7 +563,7 @@ zap_lockdir_impl(dmu_buf_t *db, void *tag, dmu_tx_t *tx, uint64_t newsz = db->db_size + SPA_MINBLOCKSIZE; if (newsz > MZAP_MAX_BLKSZ) { dprintf("upgrading obj %llu: num_entries=%u\n", - obj, zap->zap_m.zap_num_entries); + (u_longlong_t)obj, zap->zap_m.zap_num_entries); *zapp = zap; int err = mzap_upgrade(zapp, tag, tx, 0); if (err != 0) @@ -656,7 +656,7 @@ mzap_upgrade(zap_t **zapp, void *tag, dmu_tx_t *tx, zap_flags_t flags) } dprintf("upgrading obj=%llu with %u chunks\n", - zap->zap_object, nchunks); + (u_longlong_t)zap->zap_object, nchunks); /* XXX destroy the avl later, so we can use the stored hash value */ mze_destroy(zap); @@ -667,7 +667,7 @@ mzap_upgrade(zap_t **zapp, void *tag, dmu_tx_t *tx, zap_flags_t flags) if (mze->mze_name[0] == 0) continue; dprintf("adding %s=%llu\n", - mze->mze_name, mze->mze_value); + mze->mze_name, (u_longlong_t)mze->mze_value); zap_name_t *zn = zap_name_alloc(zap, mze->mze_name, 0); /* If we fail here, we would end up losing entries */ VERIFY0(fzap_add_cd(zn, 8, 1, &mze->mze_value, mze->mze_cd, @@ -1339,7 +1339,8 @@ zap_update(objset_t *os, uint64_t zapobj, const char *name, } else if (integer_size != 8 || num_integers != 1 || strlen(name) >= MZAP_NAME_LEN) { dprintf("upgrading obj %llu: intsz=%u numint=%llu name=%s\n", - zapobj, integer_size, num_integers, name); + (u_longlong_t)zapobj, integer_size, + (u_longlong_t)num_integers, name); err = mzap_upgrade(&zn->zn_zap, FTAG, tx, 0); if (err == 0) { err = fzap_update(zn, integer_size, num_integers, diff --git a/module/zfs/zcp.c b/module/zfs/zcp.c index 1ad53eae1..f724b44ba 100644 --- a/module/zfs/zcp.c +++ b/module/zfs/zcp.c @@ -654,7 +654,8 @@ zcp_debug(lua_State *state) dbgstring = lua_tostring(state, 1); - zfs_dbgmsg("txg %lld ZCP: %s", ri->zri_tx->tx_txg, dbgstring); + zfs_dbgmsg("txg %lld ZCP: %s", (longlong_t)ri->zri_tx->tx_txg, + dbgstring); return (0); } diff --git a/module/zfs/zil.c b/module/zfs/zil.c index 5443c2a1f..78d0711cc 100644 --- a/module/zfs/zil.c +++ b/module/zfs/zil.c @@ -1962,7 +1962,7 @@ zil_itx_assign(zilog_t *zilog, itx_t *itx, dmu_tx_t *tx) * This should be rare. */ zfs_dbgmsg("zil_itx_assign: missed itx cleanup for " - "txg %llu", itxg->itxg_txg); + "txg %llu", (u_longlong_t)itxg->itxg_txg); clean = itxg->itxg_itxs; } itxg->itxg_txg = txg; @@ -3287,7 +3287,8 @@ zil_close(zilog_t *zilog) txg_wait_synced(zilog->zl_dmu_pool, txg); if (zilog_is_dirty(zilog)) - zfs_dbgmsg("zil (%px) is dirty, txg %llu", zilog, txg); + zfs_dbgmsg("zil (%px) is dirty, txg %llu", zilog, + (u_longlong_t)txg); if (txg < spa_freeze_txg(zilog->zl_spa)) VERIFY(!zilog_is_dirty(zilog)); diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 66ac545c7..e33d36dab 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -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); |