diff options
| author | Conrad Meyer <cem@FreeBSD.org> | 2019-08-07 19:28:35 +0000 |
|---|---|---|
| committer | Conrad Meyer <cem@FreeBSD.org> | 2019-08-07 19:28:35 +0000 |
| commit | ac03832ef3afa26cc8e23bf5cfeaa32501b21c3e (patch) | |
| tree | 099c85706b554866296760b5ba97548aaa140133 /sys/geom/stripe | |
| parent | 76cb1112da20279c59bc8189519c4122a4d0d96a (diff) | |
Notes
Diffstat (limited to 'sys/geom/stripe')
| -rw-r--r-- | sys/geom/stripe/g_stripe.c | 1 | ||||
| -rw-r--r-- | sys/geom/stripe/g_stripe.h | 23 |
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 */ |
