diff options
author | Matthew Ahrens <[email protected]> | 2017-01-03 15:18:33 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-04-30 10:19:48 -0700 |
commit | 964c2d69a90c503f44946f31c5d4a8ac4458176d (patch) | |
tree | ea740d870b10b7e6cb9f8d76d527d3b99a2488ee /module/zfs | |
parent | 089500e79234c9cb741090ade96baec266f0ace4 (diff) |
OpenZFS 9236 - nuke spa_dbgmsg
We should use zfs_dbgmsg instead of spa_dbgmsg. Or at least,
metaslab_condense() should call zfs_dbgmsg because it's important and
rare enough to always log. It's possible that the message in
zio_dva_allocate() would be too high-frequency for zfs_dbgmsg.
Authored by: Matthew Ahrens <[email protected]>
Reviewed by: Serapheim Dimitropoulos <[email protected]>
Reviewed by: Pavel Zakharov <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Richard Elling <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Approved by: Richard Lowe <[email protected]>
Ported-by: Giuseppe Di Natale <[email protected]>
Patch Notes:
* Removed ZFS_DEBUG_SPA from zfs-module-parameters.5
OpenZFS-issue: https://www.illumos.org/issues/9236
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/cfaba7f668
Closes #7467
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/metaslab.c | 4 | ||||
-rw-r--r-- | module/zfs/spa_misc.c | 10 | ||||
-rw-r--r-- | module/zfs/zio.c | 2 |
3 files changed, 4 insertions, 12 deletions
diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c index ae98c5143..1dbe1e98c 100644 --- a/module/zfs/metaslab.c +++ b/module/zfs/metaslab.c @@ -1555,7 +1555,7 @@ metaslab_set_fragmentation(metaslab_t *msp) if (spa_writeable(spa) && txg < spa_final_dirty_txg(spa)) { msp->ms_condense_wanted = B_TRUE; vdev_dirty(vd, VDD_METASLAB, msp, txg + 1); - spa_dbgmsg(spa, "txg %llu, requesting force condense: " + zfs_dbgmsg("txg %llu, requesting force condense: " "ms_id %llu, vdev_id %llu", txg, msp->ms_id, vd->vdev_id); } @@ -2081,7 +2081,7 @@ metaslab_condense(metaslab_t *msp, uint64_t txg, dmu_tx_t *tx) ASSERT(msp->ms_loaded); - spa_dbgmsg(spa, "condensing: txg %llu, msp[%llu] %p, vdev id %llu, " + zfs_dbgmsg("condensing: txg %llu, msp[%llu] %p, 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, msp->ms_group->mg_vd->vdev_spa->spa_name, diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c index 54299a7e4..76436ba5c 100644 --- a/module/zfs/spa_misc.c +++ b/module/zfs/spa_misc.c @@ -248,7 +248,7 @@ int spa_mode_global; * by default in debug builds. */ int zfs_flags = ~(ZFS_DEBUG_DPRINTF | ZFS_DEBUG_SET_ERROR | - ZFS_DEBUG_SPA | ZFS_DEBUG_INDIRECT_REMAP); + ZFS_DEBUG_INDIRECT_REMAP); #else int zfs_flags = 0; #endif @@ -659,8 +659,6 @@ spa_add(const char *name, nvlist_t *config, const char *altroot) KM_SLEEP) == 0); } - spa->spa_debug = ((zfs_flags & ZFS_DEBUG_SPA) != 0); - spa->spa_min_ashift = INT_MAX; spa->spa_max_ashift = 0; @@ -2122,12 +2120,6 @@ spa_scan_get_stats(spa_t *spa, pool_scan_stat_t *ps) return (0); } -boolean_t -spa_debug_enabled(spa_t *spa) -{ - return (spa->spa_debug); -} - int spa_maxblocksize(spa_t *spa) { diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 9bb2459bb..b585368be 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -3295,7 +3295,7 @@ zio_dva_allocate(zio_t *zio) &zio->io_alloc_list, zio); if (error != 0) { - spa_dbgmsg(spa, "%s: metaslab allocation failure: zio %p, " + zfs_dbgmsg("%s: metaslab allocation failure: zio %p, " "size %llu, error %d", spa_name(spa), zio, zio->io_size, error); if (error == ENOSPC && zio->io_size > SPA_MINBLOCKSIZE) |