From 4511efdca03f906d2b83557ca211bc1935c73012 Mon Sep 17 00:00:00 2001 From: oster Date: Mon, 16 Sep 2002 02:35:17 +0000 Subject: rf_CheckFloatingRbufCount() is only really useful when debugging the reconstruct buffer stuff. #if it out in the general case. --- sys/dev/raidframe/rf_reconstruct.c | 8 ++++++-- sys/dev/raidframe/rf_reconutil.c | 8 +++++--- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'sys/dev/raidframe') 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 -__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 #include @@ -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 -__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 @@ -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 + -- cgit