MFV r336955: 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. illumos/illumos-gate@21f7c81cc1 Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com> Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Richard Elling <Richard.Elling@RichardElling.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Matthew Ahrens <mahrens@delphix.com>
This commit is contained in:
commit
d1cf4052d0
@ -20,7 +20,7 @@
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2016 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2011, 2017 by Delphix. All rights reserved.
|
||||
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
|
||||
* Copyright (c) 2013 Steven Hartland. All rights reserved.
|
||||
@ -5921,7 +5921,6 @@ ztest_run(ztest_shared_t *zs)
|
||||
*/
|
||||
kernel_init(FREAD | FWRITE);
|
||||
VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
|
||||
spa->spa_debug = B_TRUE;
|
||||
metaslab_preload_limit = ztest_random(20) + 1;
|
||||
ztest_spa = spa;
|
||||
|
||||
@ -6078,7 +6077,6 @@ ztest_freeze(void)
|
||||
kernel_init(FREAD | FWRITE);
|
||||
VERIFY3U(0, ==, spa_open(ztest_opts.zo_pool, &spa, FTAG));
|
||||
VERIFY3U(0, ==, ztest_dataset_open(0));
|
||||
spa->spa_debug = B_TRUE;
|
||||
ztest_spa = spa;
|
||||
|
||||
/*
|
||||
@ -6149,7 +6147,6 @@ ztest_freeze(void)
|
||||
VERIFY3U(0, ==, ztest_dataset_open(0));
|
||||
ztest_dataset_close(0);
|
||||
|
||||
spa->spa_debug = B_TRUE;
|
||||
ztest_spa = spa;
|
||||
txg_wait_synced(spa_get_dsl(spa), 0);
|
||||
ztest_reguid(NULL, 0);
|
||||
|
@ -1747,7 +1747,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);
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ int spa_mode_global;
|
||||
* Everything except dprintf, spa, and indirect_remap is on by default
|
||||
* in debug builds.
|
||||
*/
|
||||
int zfs_flags = ~(ZFS_DEBUG_DPRINTF | ZFS_DEBUG_SPA | ZFS_DEBUG_INDIRECT_REMAP);
|
||||
int zfs_flags = ~(ZFS_DEBUG_DPRINTF | ZFS_DEBUG_INDIRECT_REMAP);
|
||||
#else
|
||||
int zfs_flags = 0;
|
||||
#endif
|
||||
@ -821,8 +821,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;
|
||||
|
||||
@ -2280,12 +2278,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)
|
||||
{
|
||||
|
@ -947,13 +947,6 @@ _NOTE(CONSTCOND) } while (0)
|
||||
#define dprintf_bp(bp, fmt, ...)
|
||||
#endif
|
||||
|
||||
extern boolean_t spa_debug_enabled(spa_t *spa);
|
||||
#define spa_dbgmsg(spa, ...) \
|
||||
{ \
|
||||
if (spa_debug_enabled(spa)) \
|
||||
zfs_dbgmsg(__VA_ARGS__); \
|
||||
}
|
||||
|
||||
extern int spa_mode_global; /* mode, e.g. FREAD | FWRITE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -332,7 +332,6 @@ struct spa {
|
||||
kcondvar_t spa_suspend_cv; /* notification of resume */
|
||||
uint8_t spa_suspended; /* pool is suspended */
|
||||
uint8_t spa_claiming; /* pool is doing zil_claim() */
|
||||
boolean_t spa_debug; /* debug enabled? */
|
||||
boolean_t spa_is_root; /* pool is root */
|
||||
int spa_minref; /* num refs when first opened */
|
||||
int spa_mode; /* FREAD | FWRITE */
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2016 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2012, 2017 by Delphix. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_ZFS_DEBUG_H
|
||||
@ -57,7 +57,7 @@ extern boolean_t zfs_free_leak_on_eio;
|
||||
#define ZFS_DEBUG_DNODE_VERIFY (1 << 2)
|
||||
#define ZFS_DEBUG_SNAPNAMES (1 << 3)
|
||||
#define ZFS_DEBUG_MODIFY (1 << 4)
|
||||
#define ZFS_DEBUG_SPA (1 << 5)
|
||||
/* 1<<5 was previously used, try not to reuse */
|
||||
#define ZFS_DEBUG_ZIO_FREE (1 << 6)
|
||||
#define ZFS_DEBUG_HISTOGRAM_VERIFY (1 << 7)
|
||||
#define ZFS_DEBUG_METASLAB_VERIFY (1 << 8)
|
||||
|
@ -3037,7 +3037,7 @@ zio_dva_allocate(zio_t *zio)
|
||||
&zio->io_alloc_list, zio, zio->io_allocator);
|
||||
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user