summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2002-09-19 22:52:52 +0000
committeroster <oster@NetBSD.org>2002-09-19 22:52:52 +0000
commitbc235cf75b55bd3c97d9e8b1504045ecb3232173 (patch)
tree56f36445c2411ca96ffdfc6421c82f57f1bf28d6 /sys/dev/raidframe
parent0c1690c441505547e4b8e5ff2ff22bf15837f8eb (diff)
Introduce and use RF_DEBUG_PSS, and save a few more bytes.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_archs.h6
-rw-r--r--sys/dev/raidframe/rf_psstatus.c12
-rw-r--r--sys/dev/raidframe/rf_reconstruct.c6
3 files changed, 19 insertions, 5 deletions
diff --git a/sys/dev/raidframe/rf_archs.h b/sys/dev/raidframe/rf_archs.h
index d79d9b657c3..28457aff8e0 100644
--- a/sys/dev/raidframe/rf_archs.h
+++ b/sys/dev/raidframe/rf_archs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_archs.h,v 1.18 2002/09/17 03:54:42 oster Exp $ */
+/* $NetBSD: rf_archs.h,v 1.19 2002/09/19 22:52:52 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -132,6 +132,10 @@
#define RF_DEBUG_QUIESCE 0
#endif
+#ifndef RF_DEBUG_PSS
+#define RF_DEBUG_PSS 0
+#endif
+
#include "rf_options.h"
#endif /* !_RF__RF_ARCHS_H_ */
diff --git a/sys/dev/raidframe/rf_psstatus.c b/sys/dev/raidframe/rf_psstatus.c
index b1e47529c4e..6cc6537396f 100644
--- a/sys/dev/raidframe/rf_psstatus.c
+++ b/sys/dev/raidframe/rf_psstatus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_psstatus.c,v 1.9 2002/09/14 17:53:58 oster Exp $ */
+/* $NetBSD: rf_psstatus.c,v 1.10 2002/09/19 22:52:52 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -37,7 +37,7 @@
*****************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.9 2002/09/14 17:53:58 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.10 2002/09/19 22:52:52 oster Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -48,9 +48,15 @@ __KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.9 2002/09/14 17:53:58 oster Exp $"
#include "rf_psstatus.h"
#include "rf_shutdown.h"
+#if RF_DEBUG_PSS
#define Dprintf1(s,a) if (rf_pssDebug) rf_debug_printf(s,(void *)((unsigned long)a),NULL,NULL,NULL,NULL,NULL,NULL,NULL)
#define Dprintf2(s,a,b) if (rf_pssDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),NULL,NULL,NULL,NULL,NULL,NULL)
#define Dprintf3(s,a,b,c) if (rf_pssDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),(void *)((unsigned long)c),NULL,NULL,NULL,NULL,NULL)
+#else
+#define Dprintf1(s,a)
+#define Dprintf2(s,a,b)
+#define Dprintf3(s,a,b,c)
+#endif
static void
RealPrintPSStatusTable(RF_Raid_t * raidPtr,
@@ -150,8 +156,10 @@ rf_FreeParityStripeStatusTable(raidPtr, pssTable)
{
int i;
+#if RF_DEBUG_PSS
if (rf_pssDebug)
RealPrintPSStatusTable(raidPtr, pssTable);
+#endif
for (i = 0; i < raidPtr->pssTableSize; i++) {
if (pssTable[i].chain) {
printf("ERROR: pss hash chain not null at recon shutdown\n");
diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c
index 9fa205a19bc..af6a0d87335 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.42 2002/09/19 22:41:51 oster Exp $ */
+/* $NetBSD: rf_reconstruct.c,v 1.43 2002/09/19 22:52:52 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.42 2002/09/19 22:41:51 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.43 2002/09/19 22:52:52 oster Exp $");
#include <sys/time.h>
#include <sys/buf.h>
@@ -1688,8 +1688,10 @@ rf_UnblockRecon(raidPtr, asmap)
if (!pssPtr) {
/* printf("Warning: no pss descriptor upon unblock on psid %ld
* RU %d\n",psid,which_ru); */
+#if (RF_DEBUG_RECON > 0) || (RF_DEBUG_PSS > 0)
if (rf_reconDebug || rf_pssDebug)
printf("Warning: no pss descriptor upon unblock on psid %ld RU %d\n", (long) psid, which_ru);
+#endif
goto out;
}
pssPtr->blockCount--;