summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2002-09-16 02:35:17 +0000
committeroster <oster@NetBSD.org>2002-09-16 02:35:17 +0000
commit4511efdca03f906d2b83557ca211bc1935c73012 (patch)
tree19980f49ef4c4d3ab8db0013ea8581e653e48e9d /sys/dev/raidframe
parenta2bd5604f518e11e9787d5d6bf230203b20240b5 (diff)
rf_CheckFloatingRbufCount() is only really useful when debugging the
reconstruct buffer stuff. #if it out in the general case.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_reconstruct.c8
-rw-r--r--sys/dev/raidframe/rf_reconutil.c8
2 files changed, 11 insertions, 5 deletions
diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c
index 7a7a1a94583..cf6178e0445 100644
--- a/sys/dev/raidframe/rf_reconstruct.c
+++ b/sys/dev/raidframe/rf_reconstruct.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_reconstruct.c,v 1.37 2002/09/16 02:25:08 oster Exp $ */
+/* $NetBSD: rf_reconstruct.c,v 1.38 2002/09/16 02:35:17 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -33,7 +33,7 @@
************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.37 2002/09/16 02:25:08 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.38 2002/09/16 02:35:17 oster Exp $");
#include <sys/time.h>
#include <sys/buf.h>
@@ -880,9 +880,11 @@ ProcessReconEvent(raidPtr, frow, event)
/* a write I/O has completed */
case RF_REVENT_WRITEDONE:
+#if RF_DEBUG_RECONBUFFER
if (rf_floatingRbufDebug) {
rf_CheckFloatingRbufCount(raidPtr, 1);
}
+#endif
sectorsPerRU = raidPtr->Layout.sectorsPerStripeUnit * raidPtr->Layout.SUsPerRU;
rbuf = (RF_ReconBuffer_t *) event->arg;
rf_FreeDiskQueueData((RF_DiskQueueData_t *) rbuf->arg);
@@ -931,9 +933,11 @@ ProcessReconEvent(raidPtr, frow, event)
case RF_REVENT_BUFREADY:
Dprintf2("RECON: BUFREADY EVENT: row %d col %d\n", frow, event->col);
retcode = IssueNextWriteRequest(raidPtr, frow);
+#if RF_DEBUG_RECONBUFFER
if (rf_floatingRbufDebug) {
rf_CheckFloatingRbufCount(raidPtr, 1);
}
+#endif
break;
/* we need to skip the current RU entirely because it got
diff --git a/sys/dev/raidframe/rf_reconutil.c b/sys/dev/raidframe/rf_reconutil.c
index 14f80994023..771cae77349 100644
--- a/sys/dev/raidframe/rf_reconutil.c
+++ b/sys/dev/raidframe/rf_reconutil.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_reconutil.c,v 1.6 2002/09/14 17:53:58 oster Exp $ */
+/* $NetBSD: rf_reconutil.c,v 1.7 2002/09/16 02:35:17 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -31,7 +31,7 @@
********************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_reconutil.c,v 1.6 2002/09/14 17:53:58 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconutil.c,v 1.7 2002/09/16 02:35:17 oster Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -265,7 +265,7 @@ rf_FreeReconBuffer(rbuf)
RF_Free(rbuf, sizeof(*rbuf));
}
-
+#if RF_DEBUG_RECONBUFFER
/******************************************************************************
* debug only: sanity check the number of floating recon bufs in use
*****************************************************************************/
@@ -334,3 +334,5 @@ rf_CheckFloatingRbufCount(raidPtr, dolock)
if (dolock)
RF_UNLOCK_MUTEX(raidPtr->reconControl[frow]->rb_mutex);
}
+#endif
+