summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2002-01-09 03:10:19 +0000
committeroster <oster@NetBSD.org>2002-01-09 03:10:19 +0000
commit2ad74785a41bdf47fbab20de4839a9a5ecd30c6f (patch)
tree4706dfd5d35f38cc1eab107ea9ebad1da32c08e4 /sys/dev/raidframe
parent94f30b739f0b2aa31bf3812a20f48d9fbeff9cbe (diff)
Move a bunch of debugging stuff to be only used if DEBUG is turned on.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_reconbuffer.c16
-rw-r--r--sys/dev/raidframe/rf_reconstruct.c22
2 files changed, 34 insertions, 4 deletions
diff --git a/sys/dev/raidframe/rf_reconbuffer.c b/sys/dev/raidframe/rf_reconbuffer.c
index 4abb09f9465..7a45e83a5e2 100644
--- a/sys/dev/raidframe/rf_reconbuffer.c
+++ b/sys/dev/raidframe/rf_reconbuffer.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_reconbuffer.c,v 1.6 2001/11/13 07:11:16 lukem Exp $ */
+/* $NetBSD: rf_reconbuffer.c,v 1.7 2002/01/09 03:10:20 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -33,7 +33,7 @@
***************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_reconbuffer.c,v 1.6 2001/11/13 07:11:16 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconbuffer.c,v 1.7 2002/01/09 03:10:20 oster Exp $");
#include "rf_raid.h"
#include "rf_reconbuffer.h"
@@ -45,12 +45,24 @@ __KERNEL_RCSID(0, "$NetBSD: rf_reconbuffer.c,v 1.6 2001/11/13 07:11:16 lukem Exp
#include "rf_reconutil.h"
#include "rf_nwayxor.h"
+#ifdef DEBUG
+
#define Dprintf1(s,a) if (rf_reconbufferDebug) printf(s,a)
#define Dprintf2(s,a,b) if (rf_reconbufferDebug) printf(s,a,b)
#define Dprintf3(s,a,b,c) if (rf_reconbufferDebug) printf(s,a,b,c)
#define Dprintf4(s,a,b,c,d) if (rf_reconbufferDebug) printf(s,a,b,c,d)
#define Dprintf5(s,a,b,c,d,e) if (rf_reconbufferDebug) printf(s,a,b,c,d,e)
+#else /* DEBUG */
+
+#define Dprintf1(s,a) {}
+#define Dprintf2(s,a,b) {}
+#define Dprintf3(s,a,b,c) {}
+#define Dprintf4(s,a,b,c,d) {}
+#define Dprintf5(s,a,b,c,d,e) {}
+
+#endif
+
/*****************************************************************************
*
* Submit a reconstruction buffer to the manager for XOR. We can only
diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c
index af9d33761e4..86b886ecb6c 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.32 2001/11/15 09:48:14 lukem Exp $ */
+/* $NetBSD: rf_reconstruct.c,v 1.33 2002/01/09 03:10:19 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.32 2001/11/15 09:48:14 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.33 2002/01/09 03:10:19 oster Exp $");
#include <sys/time.h>
#include <sys/buf.h>
@@ -66,6 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.32 2001/11/15 09:48:14 lukem Ex
/* setting these to -1 causes them to be set to their default values if not set by debug options */
+#ifdef DEBUG
#define Dprintf(s) if (rf_reconDebug) rf_debug_printf(s,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)
#define Dprintf1(s,a) if (rf_reconDebug) rf_debug_printf(s,(void *)((unsigned long)a),NULL,NULL,NULL,NULL,NULL,NULL,NULL)
#define Dprintf2(s,a,b) if (rf_reconDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),NULL,NULL,NULL,NULL,NULL,NULL)
@@ -78,6 +79,23 @@ __KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.32 2001/11/15 09:48:14 lukem Ex
#define DDprintf1(s,a) if (rf_reconDebug) rf_debug_printf(s,(void *)((unsigned long)a),NULL,NULL,NULL,NULL,NULL,NULL,NULL)
#define DDprintf2(s,a,b) if (rf_reconDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),NULL,NULL,NULL,NULL,NULL,NULL)
+#else /* DEBUG */
+
+#define Dprintf(s) {}
+#define Dprintf1(s,a) {}
+#define Dprintf2(s,a,b) {}
+#define Dprintf3(s,a,b,c) {}
+#define Dprintf4(s,a,b,c,d) {}
+#define Dprintf5(s,a,b,c,d,e) {}
+#define Dprintf6(s,a,b,c,d,e,f) {}
+#define Dprintf7(s,a,b,c,d,e,f,g) {}
+
+#define DDprintf1(s,a) {}
+#define DDprintf2(s,a,b) {}
+
+#endif /* DEBUG */
+
+
static RF_FreeList_t *rf_recond_freelist;
#define RF_MAX_FREE_RECOND 4
#define RF_RECOND_INC 1