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:
parent
dfbda2465f
commit
5e89181544
|
@ -6669,7 +6669,7 @@ ztest_initialize(ztest_ds_t *zd, uint64_t id)
|
||||||
char *path = strdup(rand_vd->vdev_path);
|
char *path = strdup(rand_vd->vdev_path);
|
||||||
boolean_t active = rand_vd->vdev_initialize_thread != NULL;
|
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);
|
spa_config_exit(spa, SCL_VDEV, FTAG);
|
||||||
|
|
||||||
uint64_t cmd = ztest_random(POOL_INITIALIZE_FUNCS);
|
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);
|
char *path = strdup(rand_vd->vdev_path);
|
||||||
boolean_t active = rand_vd->vdev_trim_thread != NULL;
|
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);
|
spa_config_exit(spa, SCL_VDEV, FTAG);
|
||||||
|
|
||||||
uint64_t cmd = ztest_random(POOL_TRIM_FUNCS);
|
uint64_t cmd = ztest_random(POOL_TRIM_FUNCS);
|
||||||
|
|
|
@ -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 __set_error(const char *file, const char *func, int line, int err);
|
||||||
extern void __zfs_dbgmsg(char *buf);
|
extern void __zfs_dbgmsg(char *buf);
|
||||||
extern void __dprintf(boolean_t dprint, const char *file, const char *func,
|
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():
|
* Some general principles for using zfs_dbgmsg():
|
||||||
|
|
|
@ -796,7 +796,7 @@ kernel_init(int mode)
|
||||||
|
|
||||||
physmem = sysconf(_SC_PHYS_PAGES);
|
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));
|
(double)physmem * sysconf(_SC_PAGE_SIZE) / (1ULL << 30));
|
||||||
|
|
||||||
(void) snprintf(hw_serial, sizeof (hw_serial), "%ld",
|
(void) snprintf(hw_serial, sizeof (hw_serial), "%ld",
|
||||||
|
|
|
@ -181,7 +181,7 @@ __set_error(const char *file, const char *func, int line, int err)
|
||||||
* $ echo 512 >/sys/module/zfs/parameters/zfs_flags
|
* $ echo 512 >/sys/module/zfs/parameters/zfs_flags
|
||||||
*/
|
*/
|
||||||
if (zfs_flags & ZFS_DEBUG_SET_ERROR)
|
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
|
#ifdef _KERNEL
|
||||||
|
|
|
@ -1066,7 +1066,7 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t mounting)
|
||||||
&zfsvfs->z_kstat, zs.zs_num_entries);
|
&zfsvfs->z_kstat, zs.zs_num_entries);
|
||||||
dprintf_ds(zfsvfs->z_os->os_dsl_dataset,
|
dprintf_ds(zfsvfs->z_os->os_dsl_dataset,
|
||||||
"num_entries in unlinked set: %llu",
|
"num_entries in unlinked set: %llu",
|
||||||
zs.zs_num_entries);
|
(u_longlong_t)zs.zs_num_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
zfs_unlinked_drain(zfsvfs);
|
zfs_unlinked_drain(zfsvfs);
|
||||||
|
@ -1880,7 +1880,9 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp)
|
||||||
|
|
||||||
gen_mask = -1ULL >> (64 - 8 * i);
|
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))) {
|
if ((err = zfs_zget(zfsvfs, object, &zp))) {
|
||||||
ZFS_EXIT(zfsvfs);
|
ZFS_EXIT(zfsvfs);
|
||||||
return (err);
|
return (err);
|
||||||
|
@ -1891,7 +1893,8 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp)
|
||||||
if (zp_gen == 0)
|
if (zp_gen == 0)
|
||||||
zp_gen = 1;
|
zp_gen = 1;
|
||||||
if (zp->z_unlinked || zp_gen != fid_gen) {
|
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));
|
vrele(ZTOV(zp));
|
||||||
ZFS_EXIT(zfsvfs);
|
ZFS_EXIT(zfsvfs);
|
||||||
return (SET_ERROR(EINVAL));
|
return (SET_ERROR(EINVAL));
|
||||||
|
|
|
@ -127,7 +127,8 @@ __set_error(const char *file, const char *func, int line, int err)
|
||||||
* $ echo 512 >/sys/module/zfs/parameters/zfs_flags
|
* $ echo 512 >/sys/module/zfs/parameters/zfs_flags
|
||||||
*/
|
*/
|
||||||
if (zfs_flags & ZFS_DEBUG_SET_ERROR)
|
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
|
void
|
||||||
|
|
|
@ -7184,8 +7184,11 @@ arc_tempreserve_space(spa_t *spa, uint64_t reserve, uint64_t txg)
|
||||||
zfs_refcount_count(&arc_anon->arcs_esize[ARC_BUFC_DATA]);
|
zfs_refcount_count(&arc_anon->arcs_esize[ARC_BUFC_DATA]);
|
||||||
dprintf("failing, arc_tempreserve=%lluK anon_meta=%lluK "
|
dprintf("failing, arc_tempreserve=%lluK anon_meta=%lluK "
|
||||||
"anon_data=%lluK tempreserve=%lluK rarc_c=%lluK\n",
|
"anon_data=%lluK tempreserve=%lluK rarc_c=%lluK\n",
|
||||||
arc_tempreserve >> 10, meta_esize >> 10,
|
(u_longlong_t)arc_tempreserve >> 10,
|
||||||
data_esize >> 10, reserve >> 10, rarc_c >> 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
|
#endif
|
||||||
DMU_TX_STAT_BUMP(dmu_tx_dirty_throttle);
|
DMU_TX_STAT_BUMP(dmu_tx_dirty_throttle);
|
||||||
return (SET_ERROR(ERESTART));
|
return (SET_ERROR(ERESTART));
|
||||||
|
@ -10255,7 +10258,7 @@ out:
|
||||||
* log as the pool may be in the process of being removed.
|
* log as the pool may be in the process of being removed.
|
||||||
*/
|
*/
|
||||||
zfs_dbgmsg("L2ARC rebuild aborted, restored %llu blocks",
|
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) {
|
} else if (err != 0) {
|
||||||
spa_history_log_internal(spa, "L2ARC rebuild", NULL,
|
spa_history_log_internal(spa, "L2ARC rebuild", NULL,
|
||||||
"aborted, restored %llu blocks",
|
"aborted, restored %llu blocks",
|
||||||
|
@ -10298,7 +10301,8 @@ l2arc_dev_hdr_read(l2arc_dev_t *dev)
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
ARCSTAT_BUMP(arcstat_l2_rebuild_abort_dh_errors);
|
ARCSTAT_BUMP(arcstat_l2_rebuild_abort_dh_errors);
|
||||||
zfs_dbgmsg("L2ARC IO error (%d) while reading device header, "
|
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);
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10395,8 +10399,9 @@ l2arc_log_blk_read(l2arc_dev_t *dev,
|
||||||
if ((err = zio_wait(this_io)) != 0) {
|
if ((err = zio_wait(this_io)) != 0) {
|
||||||
ARCSTAT_BUMP(arcstat_l2_rebuild_abort_io_errors);
|
ARCSTAT_BUMP(arcstat_l2_rebuild_abort_io_errors);
|
||||||
zfs_dbgmsg("L2ARC IO error (%d) while reading log block, "
|
zfs_dbgmsg("L2ARC IO error (%d) while reading log block, "
|
||||||
"offset: %llu, vdev guid: %llu", err, this_lbp->lbp_daddr,
|
"offset: %llu, vdev guid: %llu", err,
|
||||||
dev->l2ad_vdev->vdev_guid);
|
(u_longlong_t)this_lbp->lbp_daddr,
|
||||||
|
(u_longlong_t)dev->l2ad_vdev->vdev_guid);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10410,8 +10415,10 @@ l2arc_log_blk_read(l2arc_dev_t *dev,
|
||||||
ARCSTAT_BUMP(arcstat_l2_rebuild_abort_cksum_lb_errors);
|
ARCSTAT_BUMP(arcstat_l2_rebuild_abort_cksum_lb_errors);
|
||||||
zfs_dbgmsg("L2ARC log block cksum failed, offset: %llu, "
|
zfs_dbgmsg("L2ARC log block cksum failed, offset: %llu, "
|
||||||
"vdev guid: %llu, l2ad_hand: %llu, l2ad_evict: %llu",
|
"vdev guid: %llu, l2ad_hand: %llu, l2ad_evict: %llu",
|
||||||
this_lbp->lbp_daddr, dev->l2ad_vdev->vdev_guid,
|
(u_longlong_t)this_lbp->lbp_daddr,
|
||||||
dev->l2ad_hand, dev->l2ad_evict);
|
(u_longlong_t)dev->l2ad_vdev->vdev_guid,
|
||||||
|
(u_longlong_t)dev->l2ad_hand,
|
||||||
|
(u_longlong_t)dev->l2ad_evict);
|
||||||
err = SET_ERROR(ECKSUM);
|
err = SET_ERROR(ECKSUM);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -10665,7 +10672,8 @@ l2arc_dev_hdr_update(l2arc_dev_t *dev)
|
||||||
|
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
zfs_dbgmsg("L2ARC IO error (%d) while writing device header, "
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1850,7 +1850,8 @@ dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid,
|
||||||
if (end_blkid > dn->dn_maxblkid &&
|
if (end_blkid > dn->dn_maxblkid &&
|
||||||
!(start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID))
|
!(start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID))
|
||||||
end_blkid = dn->dn_maxblkid;
|
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 = kmem_alloc(sizeof (dmu_buf_impl_t), KM_SLEEP);
|
||||||
db_search->db_level = 0;
|
db_search->db_level = 0;
|
||||||
|
|
|
@ -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_t *blkptr_copy = kmem_alloc(sizeof (*os->os_rootbp), KM_SLEEP);
|
||||||
*blkptr_copy = *os->os_rootbp;
|
*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));
|
ASSERT(dmu_tx_is_syncing(tx));
|
||||||
/* XXX the write_done callback should really give us the tx... */
|
/* XXX the write_done callback should really give us the tx... */
|
||||||
|
|
|
@ -2588,8 +2588,8 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
|
||||||
dprintf("drr_type = OBJECT obj = %llu type = %u "
|
dprintf("drr_type = OBJECT obj = %llu type = %u "
|
||||||
"bonustype = %u blksz = %u bonuslen = %u cksumtype = %u "
|
"bonustype = %u blksz = %u bonuslen = %u cksumtype = %u "
|
||||||
"compress = %u dn_slots = %u err = %d\n",
|
"compress = %u dn_slots = %u err = %d\n",
|
||||||
drro->drr_object, drro->drr_type, drro->drr_bonustype,
|
(u_longlong_t)drro->drr_object, drro->drr_type,
|
||||||
drro->drr_blksz, drro->drr_bonuslen,
|
drro->drr_bonustype, drro->drr_blksz, drro->drr_bonuslen,
|
||||||
drro->drr_checksumtype, drro->drr_compress,
|
drro->drr_checksumtype, drro->drr_compress,
|
||||||
drro->drr_dn_slots, err);
|
drro->drr_dn_slots, err);
|
||||||
break;
|
break;
|
||||||
|
@ -2600,7 +2600,8 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
|
||||||
&rrd->header.drr_u.drr_freeobjects;
|
&rrd->header.drr_u.drr_freeobjects;
|
||||||
dprintf("drr_type = FREEOBJECTS firstobj = %llu "
|
dprintf("drr_type = FREEOBJECTS firstobj = %llu "
|
||||||
"numobjs = %llu err = %d\n",
|
"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;
|
break;
|
||||||
}
|
}
|
||||||
case DRR_WRITE:
|
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 "
|
dprintf("drr_type = WRITE obj = %llu type = %u offset = %llu "
|
||||||
"lsize = %llu cksumtype = %u flags = %u "
|
"lsize = %llu cksumtype = %u flags = %u "
|
||||||
"compress = %u psize = %llu err = %d\n",
|
"compress = %u psize = %llu err = %d\n",
|
||||||
drrw->drr_object, drrw->drr_type, drrw->drr_offset,
|
(u_longlong_t)drrw->drr_object, drrw->drr_type,
|
||||||
drrw->drr_logical_size, drrw->drr_checksumtype,
|
(u_longlong_t)drrw->drr_offset,
|
||||||
drrw->drr_flags, drrw->drr_compressiontype,
|
(u_longlong_t)drrw->drr_logical_size,
|
||||||
drrw->drr_compressed_size, err);
|
drrw->drr_checksumtype, drrw->drr_flags,
|
||||||
|
drrw->drr_compressiontype,
|
||||||
|
(u_longlong_t)drrw->drr_compressed_size, err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DRR_WRITE_BYREF:
|
case DRR_WRITE_BYREF:
|
||||||
|
@ -2623,11 +2626,14 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
|
||||||
"length = %llu toguid = %llx refguid = %llx "
|
"length = %llu toguid = %llx refguid = %llx "
|
||||||
"refobject = %llu refoffset = %llu cksumtype = %u "
|
"refobject = %llu refoffset = %llu cksumtype = %u "
|
||||||
"flags = %u err = %d\n",
|
"flags = %u err = %d\n",
|
||||||
drrwbr->drr_object, drrwbr->drr_offset,
|
(u_longlong_t)drrwbr->drr_object,
|
||||||
drrwbr->drr_length, drrwbr->drr_toguid,
|
(u_longlong_t)drrwbr->drr_offset,
|
||||||
drrwbr->drr_refguid, drrwbr->drr_refobject,
|
(u_longlong_t)drrwbr->drr_length,
|
||||||
drrwbr->drr_refoffset, drrwbr->drr_checksumtype,
|
(u_longlong_t)drrwbr->drr_toguid,
|
||||||
drrwbr->drr_flags, err);
|
(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;
|
break;
|
||||||
}
|
}
|
||||||
case DRR_WRITE_EMBEDDED:
|
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 "
|
dprintf("drr_type = WRITE_EMBEDDED obj = %llu offset = %llu "
|
||||||
"length = %llu compress = %u etype = %u lsize = %u "
|
"length = %llu compress = %u etype = %u lsize = %u "
|
||||||
"psize = %u err = %d\n",
|
"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_compression, drrwe->drr_etype,
|
||||||
drrwe->drr_lsize, drrwe->drr_psize, err);
|
drrwe->drr_lsize, drrwe->drr_psize, err);
|
||||||
break;
|
break;
|
||||||
|
@ -2647,7 +2655,9 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
|
||||||
struct drr_free *drrf = &rrd->header.drr_u.drr_free;
|
struct drr_free *drrf = &rrd->header.drr_u.drr_free;
|
||||||
dprintf("drr_type = FREE obj = %llu offset = %llu "
|
dprintf("drr_type = FREE obj = %llu offset = %llu "
|
||||||
"length = %lld err = %d\n",
|
"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);
|
err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2655,7 +2665,8 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
|
||||||
{
|
{
|
||||||
struct drr_spill *drrs = &rrd->header.drr_u.drr_spill;
|
struct drr_spill *drrs = &rrd->header.drr_u.drr_spill;
|
||||||
dprintf("drr_type = SPILL obj = %llu length = %llu "
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case DRR_OBJECT_RANGE:
|
case DRR_OBJECT_RANGE:
|
||||||
|
@ -2664,7 +2675,8 @@ dprintf_drr(struct receive_record_arg *rrd, int err)
|
||||||
&rrd->header.drr_u.drr_object_range;
|
&rrd->header.drr_u.drr_object_range;
|
||||||
dprintf("drr_type = OBJECT_RANGE firstobj = %llu "
|
dprintf("drr_type = OBJECT_RANGE firstobj = %llu "
|
||||||
"numslots = %llu flags = %u err = %d\n",
|
"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);
|
drror->drr_flags, err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -613,7 +613,8 @@ dmu_tx_dirty_buf(dmu_tx_t *tx, dmu_buf_impl_t *db)
|
||||||
/* XXX txh_arg2 better not be zero... */
|
/* XXX txh_arg2 better not be zero... */
|
||||||
|
|
||||||
dprintf("found txh type %x beginblk=%llx endblk=%llx\n",
|
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) {
|
switch (txh->txh_type) {
|
||||||
case THT_WRITE:
|
case THT_WRITE:
|
||||||
|
|
|
@ -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);
|
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",
|
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);
|
DNODE_STAT_BUMP(dnode_allocate);
|
||||||
|
|
||||||
ASSERT(dn->dn_type == DMU_OT_NONE);
|
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]);
|
ASSERT0(dn->dn_next_bonustype[txg & TXG_MASK]);
|
||||||
|
|
||||||
dprintf_ds(os->os_dsl_dataset, "obj=%llu txg=%llu\n",
|
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);
|
multilist_sublist_insert_head(mls, dn);
|
||||||
|
|
||||||
|
@ -2253,7 +2254,8 @@ done:
|
||||||
range_tree_add(dn->dn_free_ranges[txgoff], blkid, nblks);
|
range_tree_add(dn->dn_free_ranges[txgoff], blkid, nblks);
|
||||||
}
|
}
|
||||||
dprintf_dnode(dn, "blkid=%llu nblks=%llu txg=%llu\n",
|
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);
|
mutex_exit(&dn->dn_mtx);
|
||||||
|
|
||||||
dbuf_free_range(dn, blkid, blkid + nblks - 1, tx);
|
dbuf_free_range(dn, blkid, blkid + nblks - 1, tx);
|
||||||
|
|
|
@ -59,7 +59,7 @@ dnode_increase_indirection(dnode_t *dn, dmu_tx_t *tx)
|
||||||
|
|
||||||
dn->dn_phys->dn_nlevels = new_level;
|
dn->dn_phys->dn_nlevels = new_level;
|
||||||
dprintf("os=%p obj=%llu, increase to %d\n", dn->dn_objset,
|
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
|
* 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;
|
dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset;
|
||||||
uint64_t bytesfreed = 0;
|
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++) {
|
for (int i = 0; i < num; i++, bp++) {
|
||||||
if (BP_IS_HOLE(bp))
|
if (BP_IS_HOLE(bp))
|
||||||
|
|
|
@ -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) {
|
if (bp->blk_birth > dsl_dataset_phys(ds)->ds_prev_snap_txg) {
|
||||||
int64_t delta;
|
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);
|
dsl_free(tx->tx_pool, tx->tx_txg, bp);
|
||||||
|
|
||||||
mutex_enter(&ds->ds_lock);
|
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,
|
dsl_dataset_phys(ds)->ds_fsid_guid,
|
||||||
(long long)ds->ds_fsid_guid,
|
(long long)ds->ds_fsid_guid,
|
||||||
spa_name(dp->dp_spa),
|
spa_name(dp->dp_spa),
|
||||||
dsobj);
|
(u_longlong_t)dsobj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -654,7 +654,7 @@ dsl_destroy_snapshots_nvl(nvlist_t *snaps, boolean_t defer,
|
||||||
char *errorstr = NULL;
|
char *errorstr = NULL;
|
||||||
(void) nvlist_lookup_string(result, ZCP_RET_ERROR, &errorstr);
|
(void) nvlist_lookup_string(result, ZCP_RET_ERROR, &errorstr);
|
||||||
if (errorstr != NULL) {
|
if (errorstr != NULL) {
|
||||||
zfs_dbgmsg(errorstr);
|
zfs_dbgmsg("%s", errorstr);
|
||||||
}
|
}
|
||||||
fnvlist_free(wrapper);
|
fnvlist_free(wrapper);
|
||||||
fnvlist_free(result);
|
fnvlist_free(result);
|
||||||
|
|
|
@ -488,7 +488,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char *name, void *tag,
|
||||||
if (next[0] == '@')
|
if (next[0] == '@')
|
||||||
break;
|
break;
|
||||||
dprintf("looking up %s in obj%lld\n",
|
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,
|
err = zap_lookup(dp->dp_meta_objset,
|
||||||
dsl_dir_phys(dd)->dd_child_dir_zapobj,
|
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);
|
mutex_enter(&dd->dd_lock);
|
||||||
ASSERT0(dd->dd_tempreserved[tx->tx_txg & TXG_MASK]);
|
ASSERT0(dd->dd_tempreserved[tx->tx_txg & TXG_MASK]);
|
||||||
dprintf_dd(dd, "txg=%llu towrite=%lluK\n", tx->tx_txg,
|
dprintf_dd(dd, "txg=%llu towrite=%lluK\n", (u_longlong_t)tx->tx_txg,
|
||||||
dd->dd_space_towrite[tx->tx_txg & TXG_MASK] / 1024);
|
(u_longlong_t)dd->dd_space_towrite[tx->tx_txg & TXG_MASK] / 1024);
|
||||||
dd->dd_space_towrite[tx->tx_txg & TXG_MASK] = 0;
|
dd->dd_space_towrite[tx->tx_txg & TXG_MASK] = 0;
|
||||||
mutex_exit(&dd->dd_lock);
|
mutex_exit(&dd->dd_lock);
|
||||||
|
|
||||||
|
@ -1344,8 +1344,9 @@ top_of_function:
|
||||||
retval = ERESTART;
|
retval = ERESTART;
|
||||||
dprintf_dd(dd, "failing: used=%lluK inflight = %lluK "
|
dprintf_dd(dd, "failing: used=%lluK inflight = %lluK "
|
||||||
"quota=%lluK tr=%lluK err=%d\n",
|
"quota=%lluK tr=%lluK err=%d\n",
|
||||||
used_on_disk>>10, est_inflight>>10,
|
(u_longlong_t)used_on_disk>>10,
|
||||||
quota>>10, asize>>10, retval);
|
(u_longlong_t)est_inflight>>10,
|
||||||
|
(u_longlong_t)quota>>10, (u_longlong_t)asize>>10, retval);
|
||||||
mutex_exit(&dd->dd_lock);
|
mutex_exit(&dd->dd_lock);
|
||||||
DMU_TX_STAT_BUMP(dmu_tx_quota);
|
DMU_TX_STAT_BUMP(dmu_tx_quota);
|
||||||
return (SET_ERROR(retval));
|
return (SET_ERROR(retval));
|
||||||
|
|
|
@ -2437,18 +2437,20 @@ metaslab_load_impl(metaslab_t *msp)
|
||||||
"loading_time %lld ms, ms_max_size %llu, "
|
"loading_time %lld ms, ms_max_size %llu, "
|
||||||
"max size error %lld, "
|
"max size error %lld, "
|
||||||
"old_weight %llx, new_weight %llx",
|
"old_weight %llx, new_weight %llx",
|
||||||
spa_syncing_txg(spa), spa_name(spa),
|
(u_longlong_t)spa_syncing_txg(spa), spa_name(spa),
|
||||||
msp->ms_group->mg_vd->vdev_id, msp->ms_id,
|
(u_longlong_t)msp->ms_group->mg_vd->vdev_id,
|
||||||
space_map_length(msp->ms_sm),
|
(u_longlong_t)msp->ms_id,
|
||||||
range_tree_space(msp->ms_unflushed_allocs),
|
(u_longlong_t)space_map_length(msp->ms_sm),
|
||||||
range_tree_space(msp->ms_unflushed_frees),
|
(u_longlong_t)range_tree_space(msp->ms_unflushed_allocs),
|
||||||
range_tree_space(msp->ms_freed),
|
(u_longlong_t)range_tree_space(msp->ms_unflushed_frees),
|
||||||
range_tree_space(msp->ms_defer[0]),
|
(u_longlong_t)range_tree_space(msp->ms_freed),
|
||||||
range_tree_space(msp->ms_defer[1]),
|
(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_start - msp->ms_unload_time) / 1000000),
|
||||||
(longlong_t)((load_end - load_start) / 1000000),
|
(longlong_t)((load_end - load_start) / 1000000),
|
||||||
msp->ms_max_size, msp->ms_max_size - max_size,
|
(u_longlong_t)msp->ms_max_size,
|
||||||
weight, msp->ms_weight);
|
(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));
|
metaslab_verify_space(msp, spa_syncing_txg(spa));
|
||||||
mutex_exit(&msp->ms_sync_lock);
|
mutex_exit(&msp->ms_sync_lock);
|
||||||
|
@ -2545,14 +2547,17 @@ metaslab_unload(metaslab_t *msp)
|
||||||
"ms_id %llu, weight %llx, "
|
"ms_id %llu, weight %llx, "
|
||||||
"selected txg %llu (%llu ms ago), alloc_txg %llu, "
|
"selected txg %llu (%llu ms ago), alloc_txg %llu, "
|
||||||
"loaded %llu ms ago, max_size %llu",
|
"loaded %llu ms ago, max_size %llu",
|
||||||
spa_syncing_txg(spa), spa_name(spa),
|
(u_longlong_t)spa_syncing_txg(spa), spa_name(spa),
|
||||||
msp->ms_group->mg_vd->vdev_id, msp->ms_id,
|
(u_longlong_t)msp->ms_group->mg_vd->vdev_id,
|
||||||
msp->ms_weight,
|
(u_longlong_t)msp->ms_id,
|
||||||
msp->ms_selected_txg,
|
(u_longlong_t)msp->ms_weight,
|
||||||
(msp->ms_unload_time - msp->ms_selected_time) / 1000 / 1000,
|
(u_longlong_t)msp->ms_selected_txg,
|
||||||
msp->ms_alloc_txg,
|
(u_longlong_t)(msp->ms_unload_time -
|
||||||
(msp->ms_unload_time - msp->ms_load_time) / 1000 / 1000,
|
msp->ms_selected_time) / 1000 / 1000,
|
||||||
msp->ms_max_size);
|
(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;
|
msp->ms_condense_wanted = B_TRUE;
|
||||||
vdev_dirty(vd, VDD_METASLAB, msp, txg + 1);
|
vdev_dirty(vd, VDD_METASLAB, msp, txg + 1);
|
||||||
zfs_dbgmsg("txg %llu, requesting force condense: "
|
zfs_dbgmsg("txg %llu, requesting force condense: "
|
||||||
"ms_id %llu, vdev_id %llu", txg, msp->ms_id,
|
"ms_id %llu, vdev_id %llu", (u_longlong_t)txg,
|
||||||
vd->vdev_id);
|
(u_longlong_t)msp->ms_id,
|
||||||
|
(u_longlong_t)vd->vdev_id);
|
||||||
}
|
}
|
||||||
msp->ms_fragmentation = ZFS_FRAG_INVALID;
|
msp->ms_fragmentation = ZFS_FRAG_INVALID;
|
||||||
return;
|
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 */
|
ASSERT(range_tree_is_empty(msp->ms_freed)); /* since it is pass 1 */
|
||||||
|
|
||||||
zfs_dbgmsg("condensing: txg %llu, msp[%llu] %px, vdev id %llu, "
|
zfs_dbgmsg("condensing: txg %llu, msp[%llu] %px, vdev id %llu, "
|
||||||
"spa %s, smp size %llu, segments %lu, forcing condense=%s", txg,
|
"spa %s, smp size %llu, segments %llu, forcing condense=%s",
|
||||||
msp->ms_id, msp, msp->ms_group->mg_vd->vdev_id,
|
(u_longlong_t)txg, (u_longlong_t)msp->ms_id, msp,
|
||||||
spa->spa_name, space_map_length(msp->ms_sm),
|
(u_longlong_t)msp->ms_group->mg_vd->vdev_id,
|
||||||
range_tree_numsegs(msp->ms_allocatable),
|
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 ? "TRUE" : "FALSE");
|
||||||
|
|
||||||
msp->ms_condense_wanted = B_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) {
|
if (zfs_flags & ZFS_DEBUG_LOG_SPACEMAP) {
|
||||||
zfs_dbgmsg("flushing: txg %llu, spa %s, vdev_id %llu, "
|
zfs_dbgmsg("flushing: txg %llu, spa %s, vdev_id %llu, "
|
||||||
"ms_id %llu, unflushed_allocs %llu, unflushed_frees %llu, "
|
"ms_id %llu, unflushed_allocs %llu, unflushed_frees %llu, "
|
||||||
"appended %llu bytes", dmu_tx_get_txg(tx), spa_name(spa),
|
"appended %llu bytes", (u_longlong_t)dmu_tx_get_txg(tx),
|
||||||
msp->ms_group->mg_vd->vdev_id, msp->ms_id,
|
spa_name(spa),
|
||||||
range_tree_space(msp->ms_unflushed_allocs),
|
(u_longlong_t)msp->ms_group->mg_vd->vdev_id,
|
||||||
range_tree_space(msp->ms_unflushed_frees),
|
(u_longlong_t)msp->ms_id,
|
||||||
(sm_len_after - sm_len_before));
|
(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, >=,
|
ASSERT3U(spa->spa_unflushed_stats.sus_memused, >=,
|
||||||
|
|
|
@ -485,8 +485,9 @@ mmp_write_uberblock(spa_t *spa)
|
||||||
if (mmp->mmp_skip_error != 0) {
|
if (mmp->mmp_skip_error != 0) {
|
||||||
mmp->mmp_skip_error = 0;
|
mmp->mmp_skip_error = 0;
|
||||||
zfs_dbgmsg("MMP write after skipping due to unavailable "
|
zfs_dbgmsg("MMP write after skipping due to unavailable "
|
||||||
"leaves, pool '%s' gethrtime %llu leaf %#llu",
|
"leaves, pool '%s' gethrtime %llu leaf %llu",
|
||||||
spa_name(spa), gethrtime(), vd->vdev_guid);
|
spa_name(spa), (u_longlong_t)gethrtime(),
|
||||||
|
(u_longlong_t)vd->vdev_guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mmp->mmp_zio_root == NULL)
|
if (mmp->mmp_zio_root == NULL)
|
||||||
|
@ -617,10 +618,11 @@ mmp_thread(void *arg)
|
||||||
"mmp_interval %llu last_mmp_fail_intervals %u "
|
"mmp_interval %llu last_mmp_fail_intervals %u "
|
||||||
"mmp_fail_intervals %u mmp_fail_ns %llu "
|
"mmp_fail_intervals %u mmp_fail_ns %llu "
|
||||||
"skip_wait %d leaves %d next_time %llu",
|
"skip_wait %d leaves %d next_time %llu",
|
||||||
spa_name(spa), gethrtime(), last_mmp_interval,
|
spa_name(spa), (u_longlong_t)gethrtime(),
|
||||||
mmp_interval, last_mmp_fail_intervals,
|
(u_longlong_t)last_mmp_interval,
|
||||||
mmp_fail_intervals, mmp_fail_ns, skip_wait, leaves,
|
(u_longlong_t)mmp_interval, last_mmp_fail_intervals,
|
||||||
next_time);
|
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 "
|
zfs_dbgmsg("MMP state change pool '%s': gethrtime %llu "
|
||||||
"last_spa_multihost %u multihost %u "
|
"last_spa_multihost %u multihost %u "
|
||||||
"last_spa_suspended %u suspended %u",
|
"last_spa_suspended %u suspended %u",
|
||||||
spa_name(spa), last_spa_multihost, multihost,
|
spa_name(spa), (u_longlong_t)gethrtime(),
|
||||||
last_spa_suspended, suspended);
|
last_spa_multihost, multihost, last_spa_suspended,
|
||||||
|
suspended);
|
||||||
mutex_enter(&mmp->mmp_io_lock);
|
mutex_enter(&mmp->mmp_io_lock);
|
||||||
mmp->mmp_last_write = gethrtime();
|
mmp->mmp_last_write = gethrtime();
|
||||||
mmp->mmp_delay = mmp_interval;
|
mmp->mmp_delay = mmp_interval;
|
||||||
|
|
|
@ -116,7 +116,8 @@ range_tree_stat_verify(range_tree_t *rt)
|
||||||
for (i = 0; i < RANGE_TREE_HISTOGRAM_SIZE; i++) {
|
for (i = 0; i < RANGE_TREE_HISTOGRAM_SIZE; i++) {
|
||||||
if (hist[i] != rt->rt_histogram[i]) {
|
if (hist[i] != rt->rt_histogram[i]) {
|
||||||
zfs_dbgmsg("i=%d, hist=%px, hist=%llu, rt_hist=%llu",
|
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]);
|
VERIFY3U(hist[i], ==, rt->rt_histogram[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1292,7 +1292,7 @@ sa_build_index(sa_handle_t *hdl, sa_buf_type_t buftype)
|
||||||
mutex_exit(&sa->sa_lock);
|
mutex_exit(&sa->sa_lock);
|
||||||
zfs_dbgmsg("Buffer Header: %x != SA_MAGIC:%x "
|
zfs_dbgmsg("Buffer Header: %x != SA_MAGIC:%x "
|
||||||
"object=%#llx\n", sa_hdr_phys->sa_magic, SA_MAGIC,
|
"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));
|
return (SET_ERROR(EIO));
|
||||||
}
|
}
|
||||||
sa_byteswap(hdl, buftype);
|
sa_byteswap(hdl, buftype);
|
||||||
|
|
|
@ -2578,8 +2578,9 @@ spa_livelist_delete_cb(void *arg, zthr_t *z)
|
||||||
.to_free = &to_free
|
.to_free = &to_free
|
||||||
};
|
};
|
||||||
zfs_dbgmsg("deleting sublist (id %llu) from"
|
zfs_dbgmsg("deleting sublist (id %llu) from"
|
||||||
" livelist %llu, %d remaining",
|
" livelist %llu, %lld remaining",
|
||||||
dle->dle_bpobj.bpo_object, ll_obj, count - 1);
|
(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,
|
VERIFY0(dsl_sync_task(spa_name(spa), NULL,
|
||||||
sublist_delete_sync, &sync_arg, 0,
|
sublist_delete_sync, &sync_arg, 0,
|
||||||
ZFS_SPACE_CHECK_DESTROY));
|
ZFS_SPACE_CHECK_DESTROY));
|
||||||
|
@ -2596,7 +2597,8 @@ spa_livelist_delete_cb(void *arg, zthr_t *z)
|
||||||
.ll_obj = ll_obj,
|
.ll_obj = ll_obj,
|
||||||
.zap_obj = zap_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,
|
VERIFY0(dsl_sync_task(spa_name(spa), NULL, livelist_delete_sync,
|
||||||
&sync_arg, 0, ZFS_SPACE_CHECK_DESTROY));
|
&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);
|
dsl_dataset_name(ds, dsname);
|
||||||
zfs_dbgmsg("txg %llu condensing livelist of %s (id %llu), bpobj %llu "
|
zfs_dbgmsg("txg %llu condensing livelist of %s (id %llu), bpobj %llu "
|
||||||
"(%llu blkptrs) and bpobj %llu (%llu blkptrs) -> bpobj %llu "
|
"(%llu blkptrs) and bpobj %llu (%llu blkptrs) -> bpobj %llu "
|
||||||
"(%llu blkptrs)", tx->tx_txg, dsname, ds->ds_object, first_obj,
|
"(%llu blkptrs)", (u_longlong_t)tx->tx_txg, dsname,
|
||||||
cur_first_size, next_obj, cur_next_size,
|
(u_longlong_t)ds->ds_object, (u_longlong_t)first_obj,
|
||||||
first->dle_bpobj.bpo_object,
|
(u_longlong_t)cur_first_size, (u_longlong_t)next_obj,
|
||||||
first->dle_bpobj.bpo_phys->bpo_num_blkptrs);
|
(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:
|
out:
|
||||||
dmu_buf_rele(ds->ds_dbuf, spa);
|
dmu_buf_rele(ds->ds_dbuf, spa);
|
||||||
spa->spa_to_condense.ds = NULL;
|
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 "
|
zfs_dbgmsg("fail_intvals>0 import_delay=%llu ub_mmp "
|
||||||
"mmp_fails=%llu ub_mmp mmp_interval=%llu "
|
"mmp_fails=%llu ub_mmp mmp_interval=%llu "
|
||||||
"import_intervals=%u", import_delay, MMP_FAIL_INT(ub),
|
"import_intervals=%llu", (u_longlong_t)import_delay,
|
||||||
MMP_INTERVAL(ub), import_intervals);
|
(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) &&
|
} else if (MMP_INTERVAL_VALID(ub) && MMP_FAIL_INT_VALID(ub) &&
|
||||||
MMP_FAIL_INT(ub) == 0) {
|
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 "
|
zfs_dbgmsg("fail_intvals=0 import_delay=%llu ub_mmp "
|
||||||
"mmp_interval=%llu ub_mmp_delay=%llu "
|
"mmp_interval=%llu ub_mmp_delay=%llu "
|
||||||
"import_intervals=%u", import_delay, MMP_INTERVAL(ub),
|
"import_intervals=%llu", (u_longlong_t)import_delay,
|
||||||
ub->ub_mmp_delay, import_intervals);
|
(u_longlong_t)MMP_INTERVAL(ub),
|
||||||
|
(u_longlong_t)ub->ub_mmp_delay,
|
||||||
|
(u_longlong_t)import_intervals);
|
||||||
|
|
||||||
} else if (MMP_VALID(ub)) {
|
} 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);
|
ub->ub_mmp_delay) * import_intervals);
|
||||||
|
|
||||||
zfs_dbgmsg("import_delay=%llu ub_mmp_delay=%llu "
|
zfs_dbgmsg("import_delay=%llu ub_mmp_delay=%llu "
|
||||||
"import_intervals=%u leaves=%u", import_delay,
|
"import_intervals=%llu leaves=%u",
|
||||||
ub->ub_mmp_delay, import_intervals,
|
(u_longlong_t)import_delay,
|
||||||
|
(u_longlong_t)ub->ub_mmp_delay,
|
||||||
|
(u_longlong_t)import_intervals,
|
||||||
vdev_count_leaves(spa));
|
vdev_count_leaves(spa));
|
||||||
} else {
|
} else {
|
||||||
/* Using local tunings is the only reasonable option */
|
/* Using local tunings is the only reasonable option */
|
||||||
zfs_dbgmsg("pool last imported on non-MMP aware "
|
zfs_dbgmsg("pool last imported on non-MMP aware "
|
||||||
"host using import_delay=%llu multihost_interval=%llu "
|
"host using import_delay=%llu multihost_interval=%llu "
|
||||||
"import_intervals=%u", import_delay, multihost_interval,
|
"import_intervals=%llu", (u_longlong_t)import_delay,
|
||||||
import_intervals);
|
(u_longlong_t)multihost_interval,
|
||||||
|
(u_longlong_t)import_intervals);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (import_delay);
|
return (import_delay);
|
||||||
|
@ -3191,8 +3202,11 @@ spa_activity_check(spa_t *spa, uberblock_t *ub, nvlist_t *config)
|
||||||
"txg %llu ub_txg %llu "
|
"txg %llu ub_txg %llu "
|
||||||
"timestamp %llu ub_timestamp %llu "
|
"timestamp %llu ub_timestamp %llu "
|
||||||
"mmp_config %#llx ub_mmp_config %#llx",
|
"mmp_config %#llx ub_mmp_config %#llx",
|
||||||
txg, ub->ub_txg, timestamp, ub->ub_timestamp,
|
(u_longlong_t)txg, (u_longlong_t)ub->ub_txg,
|
||||||
mmp_config, ub->ub_mmp_config);
|
(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);
|
error = SET_ERROR(EREMOTEIO);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -337,17 +337,18 @@ spa_checkpoint_discard_thread_sync(void *arg, dmu_tx_t *tx)
|
||||||
spa_checkpoint_accounting_verify(vd->vdev_spa);
|
spa_checkpoint_accounting_verify(vd->vdev_spa);
|
||||||
#endif
|
#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",
|
"deleted %llu words - %llu words are left",
|
||||||
tx->tx_txg, vd->vdev_id, (words_before - words_after),
|
(u_longlong_t)tx->tx_txg, (longlong_t)vd->vdev_id,
|
||||||
words_after);
|
(u_longlong_t)(words_before - words_after),
|
||||||
|
(u_longlong_t)words_after);
|
||||||
|
|
||||||
if (error != EINTR) {
|
if (error != EINTR) {
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
zfs_panic_recover("zfs: error %d was returned "
|
zfs_panic_recover("zfs: error %lld was returned "
|
||||||
"while incrementally destroying the checkpoint "
|
"while incrementally destroying the checkpoint "
|
||||||
"space map of vdev %llu\n",
|
"space map of vdev %u\n",
|
||||||
error, vd->vdev_id);
|
(longlong_t)error, vd->vdev_id);
|
||||||
}
|
}
|
||||||
ASSERT0(words_after);
|
ASSERT0(words_after);
|
||||||
ASSERT0(space_map_allocated(vd->vdev_checkpoint_sm));
|
ASSERT0(space_map_allocated(vd->vdev_checkpoint_sm));
|
||||||
|
|
|
@ -296,14 +296,17 @@ spa_history_log_sync(void *arg, dmu_tx_t *tx)
|
||||||
} else if (nvlist_exists(nvl, ZPOOL_HIST_INT_NAME)) {
|
} else if (nvlist_exists(nvl, ZPOOL_HIST_INT_NAME)) {
|
||||||
if (nvlist_exists(nvl, ZPOOL_HIST_DSNAME)) {
|
if (nvlist_exists(nvl, ZPOOL_HIST_DSNAME)) {
|
||||||
zfs_dbgmsg("txg %lld %s %s (id %llu) %s",
|
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_INT_NAME),
|
||||||
fnvlist_lookup_string(nvl, ZPOOL_HIST_DSNAME),
|
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));
|
fnvlist_lookup_string(nvl, ZPOOL_HIST_INT_STR));
|
||||||
} else {
|
} else {
|
||||||
zfs_dbgmsg("txg %lld %s %s",
|
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_NAME),
|
||||||
fnvlist_lookup_string(nvl, ZPOOL_HIST_INT_STR));
|
fnvlist_lookup_string(nvl, ZPOOL_HIST_INT_STR));
|
||||||
}
|
}
|
||||||
|
|
|
@ -615,7 +615,7 @@ spa_deadman(void *arg)
|
||||||
|
|
||||||
zfs_dbgmsg("slow spa_sync: started %llu seconds ago, calls %llu",
|
zfs_dbgmsg("slow spa_sync: started %llu seconds ago, calls %llu",
|
||||||
(gethrtime() - spa->spa_sync_starttime) / NANOSEC,
|
(gethrtime() - spa->spa_sync_starttime) / NANOSEC,
|
||||||
++spa->spa_deadman_calls);
|
(u_longlong_t)++spa->spa_deadman_calls);
|
||||||
if (zfs_deadman_enabled)
|
if (zfs_deadman_enabled)
|
||||||
vdev_deadman(spa->spa_root_vdev, FTAG);
|
vdev_deadman(spa->spa_root_vdev, FTAG);
|
||||||
|
|
||||||
|
|
|
@ -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_data_block_size != blocksize ||
|
||||||
doi.doi_metadata_block_size != 1 << space_map_ibs) {
|
doi.doi_metadata_block_size != 1 << space_map_ibs) {
|
||||||
zfs_dbgmsg("txg %llu, spa %s, sm %px, reallocating "
|
zfs_dbgmsg("txg %llu, spa %s, sm %px, reallocating "
|
||||||
"object[%llu]: old bonus %u, old blocksz %u",
|
"object[%llu]: old bonus %llu, old blocksz %u",
|
||||||
dmu_tx_get_txg(tx), spa_name(spa), sm, sm->sm_object,
|
(u_longlong_t)dmu_tx_get_txg(tx), spa_name(spa), sm,
|
||||||
doi.doi_bonus_size, doi.doi_data_block_size);
|
(u_longlong_t)sm->sm_object,
|
||||||
|
(u_longlong_t)doi.doi_bonus_size,
|
||||||
|
doi.doi_data_block_size);
|
||||||
|
|
||||||
space_map_free(sm, tx);
|
space_map_free(sm, tx);
|
||||||
dmu_buf_rele(sm->sm_dbuf, sm);
|
dmu_buf_rele(sm->sm_dbuf, sm);
|
||||||
|
|
|
@ -554,7 +554,8 @@ txg_sync_thread(void *arg)
|
||||||
!txg_has_quiesced_to_sync(dp) &&
|
!txg_has_quiesced_to_sync(dp) &&
|
||||||
dp->dp_dirty_total < dirty_min_bytes) {
|
dp->dp_dirty_total < dirty_min_bytes) {
|
||||||
dprintf("waiting; tx_synced=%llu waiting=%llu dp=%p\n",
|
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);
|
txg_thread_wait(tx, &cpr, &tx->tx_sync_more_cv, timer);
|
||||||
delta = ddi_get_lbolt() - start;
|
delta = ddi_get_lbolt() - start;
|
||||||
timer = (delta > timeout ? 0 : timeout - delta);
|
timer = (delta > timeout ? 0 : timeout - delta);
|
||||||
|
@ -587,7 +588,8 @@ txg_sync_thread(void *arg)
|
||||||
cv_broadcast(&tx->tx_quiesce_more_cv);
|
cv_broadcast(&tx->tx_quiesce_more_cv);
|
||||||
|
|
||||||
dprintf("txg=%llu quiesce_txg=%llu sync_txg=%llu\n",
|
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);
|
mutex_exit(&tx->tx_sync_lock);
|
||||||
|
|
||||||
txg_stat_t *ts = spa_txg_history_init_io(spa, txg, dp);
|
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;
|
txg = tx->tx_open_txg;
|
||||||
dprintf("txg=%llu quiesce_txg=%llu sync_txg=%llu\n",
|
dprintf("txg=%llu quiesce_txg=%llu sync_txg=%llu\n",
|
||||||
txg, tx->tx_quiesce_txg_waiting,
|
(u_longlong_t)txg,
|
||||||
tx->tx_sync_txg_waiting);
|
(u_longlong_t)tx->tx_quiesce_txg_waiting,
|
||||||
|
(u_longlong_t)tx->tx_sync_txg_waiting);
|
||||||
tx->tx_quiescing_txg = txg;
|
tx->tx_quiescing_txg = txg;
|
||||||
|
|
||||||
mutex_exit(&tx->tx_sync_lock);
|
mutex_exit(&tx->tx_sync_lock);
|
||||||
|
@ -649,7 +652,8 @@ txg_quiesce_thread(void *arg)
|
||||||
/*
|
/*
|
||||||
* Hand this txg off to the sync thread.
|
* 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_quiescing_txg = 0;
|
||||||
tx->tx_quiesced_txg = txg;
|
tx->tx_quiesced_txg = txg;
|
||||||
DTRACE_PROBE2(txg__quiesced, dsl_pool_t *, dp, uint64_t, 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)
|
if (tx->tx_sync_txg_waiting < txg)
|
||||||
tx->tx_sync_txg_waiting = txg;
|
tx->tx_sync_txg_waiting = txg;
|
||||||
dprintf("txg=%llu quiesce_txg=%llu sync_txg=%llu\n",
|
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) {
|
while (tx->tx_synced_txg < txg) {
|
||||||
dprintf("broadcasting sync more "
|
dprintf("broadcasting sync more "
|
||||||
"tx_synced=%llu waiting=%llu dp=%px\n",
|
"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);
|
cv_broadcast(&tx->tx_sync_more_cv);
|
||||||
if (wait_sig) {
|
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)
|
if (tx->tx_quiesce_txg_waiting < txg && should_quiesce)
|
||||||
tx->tx_quiesce_txg_waiting = txg;
|
tx->tx_quiesce_txg_waiting = txg;
|
||||||
dprintf("txg=%llu quiesce_txg=%llu sync_txg=%llu\n",
|
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) {
|
while (tx->tx_open_txg < txg) {
|
||||||
cv_broadcast(&tx->tx_quiesce_more_cv);
|
cv_broadcast(&tx->tx_quiesce_more_cv);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -165,7 +165,8 @@ vdev_dbgmsg_print_tree(vdev_t *vd, int indent)
|
||||||
char state[20];
|
char state[20];
|
||||||
|
|
||||||
if (vd->vdev_ishole || vd->vdev_ops == &vdev_missing_ops) {
|
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);
|
vd->vdev_ops->vdev_op_type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -5208,7 +5209,7 @@ vdev_deadman(vdev_t *vd, char *tag)
|
||||||
zio_t *fio;
|
zio_t *fio;
|
||||||
uint64_t delta;
|
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));
|
vd->vdev_path, avl_numnodes(&vq->vq_active_tree));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -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: "
|
zfs_dbgmsg("finished condense of vdev %llu in txg %llu: "
|
||||||
"new mapping object %llu has %llu entries "
|
"new mapping object %llu has %llu entries "
|
||||||
"(was %llu entries)",
|
"(was %llu entries)",
|
||||||
vd->vdev_id, dmu_tx_get_txg(tx), vic->vic_mapping_object,
|
(u_longlong_t)vd->vdev_id, (u_longlong_t)dmu_tx_get_txg(tx),
|
||||||
new_count, old_count);
|
(u_longlong_t)vic->vic_mapping_object,
|
||||||
|
(u_longlong_t)new_count, (u_longlong_t)old_count);
|
||||||
|
|
||||||
vdev_config_dirty(spa->spa_root_vdev);
|
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: "
|
zfs_dbgmsg("starting condense of vdev %llu in txg %llu: "
|
||||||
"posm=%llu nm=%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_prev_obsolete_sm_object,
|
||||||
(u_longlong_t)scip->scip_next_mapping_object);
|
(u_longlong_t)scip->scip_next_mapping_object);
|
||||||
|
|
||||||
|
|
|
@ -345,8 +345,9 @@ vdev_remove_initiate_sync(void *arg, dmu_tx_t *tx)
|
||||||
vdev_config_dirty(vd);
|
vdev_config_dirty(vd);
|
||||||
|
|
||||||
zfs_dbgmsg("starting removal thread for vdev %llu (%px) in txg %llu "
|
zfs_dbgmsg("starting removal thread for vdev %llu (%px) in txg %llu "
|
||||||
"im_obj=%llu", vd->vdev_id, vd, dmu_tx_get_txg(tx),
|
"im_obj=%llu", (u_longlong_t)vd->vdev_id, vd,
|
||||||
vic->vic_mapping_object);
|
(u_longlong_t)dmu_tx_get_txg(tx),
|
||||||
|
(u_longlong_t)vic->vic_mapping_object);
|
||||||
|
|
||||||
spa_history_log_internal(spa, "vdev remove started", tx,
|
spa_history_log_internal(spa, "vdev remove started", tx,
|
||||||
"%s vdev %llu %s", spa_name(spa), (u_longlong_t)vd->vdev_id,
|
"%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))
|
if (!spa_writeable(spa))
|
||||||
return;
|
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,
|
svr->svr_thread = thread_create(NULL, 0, spa_vdev_remove_thread, spa,
|
||||||
0, &p0, TS_RUN, minclsyspri);
|
0, &p0, TS_RUN, minclsyspri);
|
||||||
}
|
}
|
||||||
|
@ -1196,7 +1198,7 @@ vdev_remove_complete(spa_t *spa)
|
||||||
ESC_ZFS_VDEV_REMOVE_DEV);
|
ESC_ZFS_VDEV_REMOVE_DEV);
|
||||||
|
|
||||||
zfs_dbgmsg("finishing device removal for vdev %llu in txg %llu",
|
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.
|
* Discard allocation state.
|
||||||
|
@ -1490,8 +1492,9 @@ spa_vdev_remove_thread(void *arg)
|
||||||
|
|
||||||
vca.vca_msp = msp;
|
vca.vca_msp = msp;
|
||||||
zfs_dbgmsg("copying %llu segments for metaslab %llu",
|
zfs_dbgmsg("copying %llu segments for metaslab %llu",
|
||||||
zfs_btree_numnodes(&svr->svr_allocd_segs->rt_root),
|
(u_longlong_t)zfs_btree_numnodes(
|
||||||
msp->ms_id);
|
&svr->svr_allocd_segs->rt_root),
|
||||||
|
(u_longlong_t)msp->ms_id);
|
||||||
|
|
||||||
while (!svr->svr_thread_exit &&
|
while (!svr->svr_thread_exit &&
|
||||||
!range_tree_is_empty(svr->svr_allocd_segs)) {
|
!range_tree_is_empty(svr->svr_allocd_segs)) {
|
||||||
|
@ -1592,8 +1595,8 @@ spa_vdev_remove_thread(void *arg)
|
||||||
vca.vca_write_error_bytes > 0)) {
|
vca.vca_write_error_bytes > 0)) {
|
||||||
zfs_dbgmsg("canceling removal due to IO errors: "
|
zfs_dbgmsg("canceling removal due to IO errors: "
|
||||||
"[read_error_bytes=%llu] [write_error_bytes=%llu]",
|
"[read_error_bytes=%llu] [write_error_bytes=%llu]",
|
||||||
vca.vca_read_error_bytes,
|
(u_longlong_t)vca.vca_read_error_bytes,
|
||||||
vca.vca_write_error_bytes);
|
(u_longlong_t)vca.vca_write_error_bytes);
|
||||||
spa_vdev_remove_cancel_impl(spa);
|
spa_vdev_remove_cancel_impl(spa);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1765,7 +1768,7 @@ spa_vdev_remove_cancel_sync(void *arg, dmu_tx_t *tx)
|
||||||
vdev_config_dirty(vd);
|
vdev_config_dirty(vd);
|
||||||
|
|
||||||
zfs_dbgmsg("canceled device removal for vdev %llu in %llu",
|
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,
|
spa_history_log_internal(spa, "vdev remove canceled", tx,
|
||||||
"%s vdev %llu %s", spa_name(spa),
|
"%s vdev %llu %s", spa_name(spa),
|
||||||
(u_longlong_t)vd->vdev_id,
|
(u_longlong_t)vd->vdev_id,
|
||||||
|
|
|
@ -221,7 +221,8 @@ zap_table_grow(zap_t *zap, zap_table_phys_t *tbl,
|
||||||
tbl->zt_blks_copied++;
|
tbl->zt_blks_copied++;
|
||||||
|
|
||||||
dprintf("copied block %llu of %llu\n",
|
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) {
|
if (tbl->zt_blks_copied == tbl->zt_numblks) {
|
||||||
(void) dmu_free_range(zap->zap_objset, zap->zap_object,
|
(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;
|
tbl->zt_blks_copied = 0;
|
||||||
|
|
||||||
dprintf("finished; numblocks now %llu (%uk entries)\n",
|
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);
|
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(RW_LOCK_HELD(&zap->zap_rwlock));
|
||||||
ASSERT(tbl->zt_blk != 0);
|
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 blk = idx >> (bs-3);
|
||||||
uint64_t off = idx & ((1<<(bs-3))-1);
|
uint64_t off = idx & ((1<<(bs-3))-1);
|
||||||
|
|
|
@ -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;
|
uint64_t newsz = db->db_size + SPA_MINBLOCKSIZE;
|
||||||
if (newsz > MZAP_MAX_BLKSZ) {
|
if (newsz > MZAP_MAX_BLKSZ) {
|
||||||
dprintf("upgrading obj %llu: num_entries=%u\n",
|
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;
|
*zapp = zap;
|
||||||
int err = mzap_upgrade(zapp, tag, tx, 0);
|
int err = mzap_upgrade(zapp, tag, tx, 0);
|
||||||
if (err != 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",
|
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 */
|
/* XXX destroy the avl later, so we can use the stored hash value */
|
||||||
mze_destroy(zap);
|
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)
|
if (mze->mze_name[0] == 0)
|
||||||
continue;
|
continue;
|
||||||
dprintf("adding %s=%llu\n",
|
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);
|
zap_name_t *zn = zap_name_alloc(zap, mze->mze_name, 0);
|
||||||
/* If we fail here, we would end up losing entries */
|
/* If we fail here, we would end up losing entries */
|
||||||
VERIFY0(fzap_add_cd(zn, 8, 1, &mze->mze_value, mze->mze_cd,
|
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 ||
|
} else if (integer_size != 8 || num_integers != 1 ||
|
||||||
strlen(name) >= MZAP_NAME_LEN) {
|
strlen(name) >= MZAP_NAME_LEN) {
|
||||||
dprintf("upgrading obj %llu: intsz=%u numint=%llu name=%s\n",
|
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);
|
err = mzap_upgrade(&zn->zn_zap, FTAG, tx, 0);
|
||||||
if (err == 0) {
|
if (err == 0) {
|
||||||
err = fzap_update(zn, integer_size, num_integers,
|
err = fzap_update(zn, integer_size, num_integers,
|
||||||
|
|
|
@ -654,7 +654,8 @@ zcp_debug(lua_State *state)
|
||||||
|
|
||||||
dbgstring = lua_tostring(state, 1);
|
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);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1960,7 +1960,7 @@ zil_itx_assign(zilog_t *zilog, itx_t *itx, dmu_tx_t *tx)
|
||||||
* This should be rare.
|
* This should be rare.
|
||||||
*/
|
*/
|
||||||
zfs_dbgmsg("zil_itx_assign: missed itx cleanup for "
|
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;
|
clean = itxg->itxg_itxs;
|
||||||
}
|
}
|
||||||
itxg->itxg_txg = txg;
|
itxg->itxg_txg = txg;
|
||||||
|
@ -3285,7 +3285,8 @@ zil_close(zilog_t *zilog)
|
||||||
txg_wait_synced(zilog->zl_dmu_pool, txg);
|
txg_wait_synced(zilog->zl_dmu_pool, txg);
|
||||||
|
|
||||||
if (zilog_is_dirty(zilog))
|
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))
|
if (txg < spa_freeze_txg(zilog->zl_spa))
|
||||||
VERIFY(!zilog_is_dirty(zilog));
|
VERIFY(!zilog_is_dirty(zilog));
|
||||||
|
|
||||||
|
|
|
@ -2014,18 +2014,24 @@ zio_deadman_impl(zio_t *pio, int ziodepth)
|
||||||
|
|
||||||
zfs_dbgmsg("slow zio[%d]: zio=%px timestamp=%llu "
|
zfs_dbgmsg("slow zio[%d]: zio=%px timestamp=%llu "
|
||||||
"delta=%llu queued=%llu io=%llu "
|
"delta=%llu queued=%llu io=%llu "
|
||||||
"path=%s last=%llu "
|
"path=%s "
|
||||||
"type=%d priority=%d flags=0x%x "
|
"last=%llu type=%d "
|
||||||
"stage=0x%x pipeline=0x%x pipeline-trace=0x%x "
|
"priority=%d flags=0x%x stage=0x%x "
|
||||||
"objset=%llu object=%llu level=%llu blkid=%llu "
|
"pipeline=0x%x pipeline-trace=0x%x "
|
||||||
"offset=%llu size=%llu error=%d",
|
"objset=%llu object=%llu "
|
||||||
|
"level=%llu blkid=%llu "
|
||||||
|
"offset=%llu size=%llu "
|
||||||
|
"error=%d",
|
||||||
ziodepth, pio, pio->io_timestamp,
|
ziodepth, pio, pio->io_timestamp,
|
||||||
delta, pio->io_delta, pio->io_delay,
|
(u_longlong_t)delta, pio->io_delta, pio->io_delay,
|
||||||
vd ? vd->vdev_path : "NULL", vq ? vq->vq_io_complete_ts : 0,
|
vd ? vd->vdev_path : "NULL",
|
||||||
pio->io_type, pio->io_priority, pio->io_flags,
|
vq ? vq->vq_io_complete_ts : 0, pio->io_type,
|
||||||
pio->io_stage, pio->io_pipeline, pio->io_pipeline_trace,
|
pio->io_priority, pio->io_flags, pio->io_stage,
|
||||||
zb->zb_objset, zb->zb_object, zb->zb_level, zb->zb_blkid,
|
pio->io_pipeline, pio->io_pipeline_trace,
|
||||||
pio->io_offset, pio->io_size, pio->io_error);
|
(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,
|
(void) zfs_ereport_post(FM_EREPORT_ZFS_DEADMAN,
|
||||||
pio->io_spa, vd, zb, pio, 0);
|
pio->io_spa, vd, zb, pio, 0);
|
||||||
|
|
||||||
|
@ -3533,7 +3539,8 @@ zio_dva_allocate(zio_t *zio)
|
||||||
if (zfs_flags & ZFS_DEBUG_METASLAB_ALLOC) {
|
if (zfs_flags & ZFS_DEBUG_METASLAB_ALLOC) {
|
||||||
zfs_dbgmsg("%s: metaslab allocation failure, "
|
zfs_dbgmsg("%s: metaslab allocation failure, "
|
||||||
"trying normal class: zio %px, size %llu, error %d",
|
"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,
|
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) {
|
if (zfs_flags & ZFS_DEBUG_METASLAB_ALLOC) {
|
||||||
zfs_dbgmsg("%s: metaslab allocation failure, "
|
zfs_dbgmsg("%s: metaslab allocation failure, "
|
||||||
"trying ganging: zio %px, size %llu, error %d",
|
"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));
|
return (zio_write_gang_block(zio, mc));
|
||||||
}
|
}
|
||||||
|
@ -3554,7 +3562,8 @@ zio_dva_allocate(zio_t *zio)
|
||||||
(zfs_flags & ZFS_DEBUG_METASLAB_ALLOC)) {
|
(zfs_flags & ZFS_DEBUG_METASLAB_ALLOC)) {
|
||||||
zfs_dbgmsg("%s: metaslab allocation failure: zio %px, "
|
zfs_dbgmsg("%s: metaslab allocation failure: zio %px, "
|
||||||
"size %llu, error %d",
|
"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;
|
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 {
|
} else {
|
||||||
zfs_dbgmsg("%s: zil block allocation failure: "
|
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);
|
return (error);
|
||||||
|
|
Loading…
Reference in New Issue