aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/stripe
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2019-08-07 19:28:35 +0000
committerConrad Meyer <cem@FreeBSD.org>2019-08-07 19:28:35 +0000
commitac03832ef3afa26cc8e23bf5cfeaa32501b21c3e (patch)
tree099c85706b554866296760b5ba97548aaa140133 /sys/geom/stripe
parent76cb1112da20279c59bc8189519c4122a4d0d96a (diff)
Notes
Diffstat (limited to 'sys/geom/stripe')
-rw-r--r--sys/geom/stripe/g_stripe.c1
-rw-r--r--sys/geom/stripe/g_stripe.h23
2 files changed, 5 insertions, 19 deletions
diff --git a/sys/geom/stripe/g_stripe.c b/sys/geom/stripe/g_stripe.c
index 23873f778670..91b8b362e319 100644
--- a/sys/geom/stripe/g_stripe.c
+++ b/sys/geom/stripe/g_stripe.c
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <vm/uma.h>
#include <geom/geom.h>
+#include <geom/geom_dbg.h>
#include <geom/stripe/g_stripe.h>
FEATURE(geom_stripe, "GEOM striping support");
diff --git a/sys/geom/stripe/g_stripe.h b/sys/geom/stripe/g_stripe.h
index beef7fe24116..90b97426713c 100644
--- a/sys/geom/stripe/g_stripe.h
+++ b/sys/geom/stripe/g_stripe.h
@@ -49,25 +49,10 @@
#define G_STRIPE_TYPE_MANUAL 0
#define G_STRIPE_TYPE_AUTOMATIC 1
-#define G_STRIPE_DEBUG(lvl, ...) do { \
- if (g_stripe_debug >= (lvl)) { \
- printf("GEOM_STRIPE"); \
- if (g_stripe_debug > 0) \
- printf("[%u]", lvl); \
- printf(": "); \
- printf(__VA_ARGS__); \
- printf("\n"); \
- } \
-} while (0)
-#define G_STRIPE_LOGREQ(bp, ...) do { \
- if (g_stripe_debug >= 2) { \
- printf("GEOM_STRIPE[2]: "); \
- printf(__VA_ARGS__); \
- printf(" "); \
- g_print_bio(bp); \
- printf("\n"); \
- } \
-} while (0)
+#define G_STRIPE_DEBUG(lvl, ...) \
+ _GEOM_DEBUG("GEOM_STRIPE", g_stripe_debug, (lvl), NULL, __VA_ARGS__)
+#define G_STRIPE_LOGREQ(bp, ...) \
+ _GEOM_DEBUG("GEOM_STRIPE", g_stripe_debug, 2, (bp), __VA_ARGS__)
struct g_stripe_softc {
u_int sc_type; /* provider type */