rf_CheckFloatingRbufCount() is only really useful when debugging the

reconstruct buffer stuff.  #if it out in the general case.
This commit is contained in:
oster 2002-09-16 02:35:17 +00:00
parent a2bd5604f5
commit 4511efdca0
2 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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