From 5ce00478e0205286a44aa76077c9ba43057d2f34 Mon Sep 17 00:00:00 2001 From: pjd Date: Fri, 6 Aug 2004 10:19:34 +0000 Subject: Add and document kern.geom.stripe.fast_failed sysctl, which shows how many times "fast" mode failed. --- sys/geom/stripe/g_stripe.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/geom/stripe/g_stripe.c b/sys/geom/stripe/g_stripe.c index 9f6c24d..e490c79 100644 --- a/sys/geom/stripe/g_stripe.c +++ b/sys/geom/stripe/g_stripe.c @@ -89,6 +89,9 @@ static u_int g_stripe_maxmem = MAX_IO_SIZE * 10; TUNABLE_INT("kern.geom.stripe.maxmem", &g_stripe_maxmem); SYSCTL_UINT(_kern_geom_stripe, OID_AUTO, maxmem, CTLFLAG_RD, &g_stripe_maxmem, 0, "Maximum memory that can be allocated in \"fast\" mode (in bytes)"); +static u_int g_stripe_fast_failed = 0; +SYSCTL_UINT(_kern_geom_stripe, OID_AUTO, fast_failed, CTLFLAG_RD, + &g_stripe_fast_failed, 0, "How many times \"fast\" mode failed"); /* * Greatest Common Divisor. @@ -583,8 +586,11 @@ g_stripe_start(struct bio *bp) fast = 1; } error = 0; - if (fast) + if (fast) { error = g_stripe_start_fast(bp, no, offset, length); + if (error != 0) + g_stripe_fast_failed++; + } /* * Do use "economic" when: * 1. "Economic" mode is ON. -- cgit v1.1