svn commit: r326132 - head/sys/geom/mirror
Mark Johnston
markj at FreeBSD.org
Thu Nov 23 14:07:53 UTC 2017
Author: markj
Date: Thu Nov 23 14:07:52 2017
New Revision: 326132
URL: https://svnweb.freebsd.org/changeset/base/326132
Log:
Allow kern.geom.mirror.debug to be negative.
A negative value can be used to suppress all prints from the gmirror
kernel code, which can be useful when attempting to trigger race
conditions using stress tests.
MFC after: 1 week
Modified:
head/sys/geom/mirror/g_mirror.c
head/sys/geom/mirror/g_mirror.h
Modified: head/sys/geom/mirror/g_mirror.c
==============================================================================
--- head/sys/geom/mirror/g_mirror.c Thu Nov 23 14:03:10 2017 (r326131)
+++ head/sys/geom/mirror/g_mirror.c Thu Nov 23 14:07:52 2017 (r326132)
@@ -54,8 +54,8 @@ static MALLOC_DEFINE(M_MIRROR, "mirror_data", "GEOM_MI
SYSCTL_DECL(_kern_geom);
static SYSCTL_NODE(_kern_geom, OID_AUTO, mirror, CTLFLAG_RW, 0,
"GEOM_MIRROR stuff");
-u_int g_mirror_debug = 0;
-SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, debug, CTLFLAG_RWTUN, &g_mirror_debug, 0,
+int g_mirror_debug = 0;
+SYSCTL_INT(_kern_geom_mirror, OID_AUTO, debug, CTLFLAG_RWTUN, &g_mirror_debug, 0,
"Debug level");
static u_int g_mirror_timeout = 4;
SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, timeout, CTLFLAG_RWTUN, &g_mirror_timeout,
Modified: head/sys/geom/mirror/g_mirror.h
==============================================================================
--- head/sys/geom/mirror/g_mirror.h Thu Nov 23 14:03:10 2017 (r326131)
+++ head/sys/geom/mirror/g_mirror.h Thu Nov 23 14:07:52 2017 (r326132)
@@ -72,7 +72,7 @@
G_MIRROR_DEVICE_FLAG_NOFAILSYNC)
#ifdef _KERNEL
-extern u_int g_mirror_debug;
+extern int g_mirror_debug;
#define G_MIRROR_DEBUG(lvl, ...) do { \
if (g_mirror_debug >= (lvl)) { \
More information about the svn-src-head
mailing list