diff options
author | pjd <pjd@FreeBSD.org> | 2004-08-06 10:19:34 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2004-08-06 10:19:34 +0000 |
commit | 5ce00478e0205286a44aa76077c9ba43057d2f34 (patch) | |
tree | ab4c2b37f499b9bc4b3c0c371c0659f595b4b353 /sys | |
parent | 2d5face9e311aaaad8fcc4472491b17e4373c4dc (diff) | |
download | FreeBSD-src-5ce00478e0205286a44aa76077c9ba43057d2f34.zip FreeBSD-src-5ce00478e0205286a44aa76077c9ba43057d2f34.tar.gz |
Add and document kern.geom.stripe.fast_failed sysctl, which shows how
many times "fast" mode failed.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/stripe/g_stripe.c | 8 |
1 files changed, 7 insertions, 1 deletions
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. |