summaryrefslogtreecommitdiffstats
path: root/sys/dev/vinum
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2001-05-23 23:24:05 +0000
committergrog <grog@FreeBSD.org>2001-05-23 23:24:05 +0000
commit594482926a8049dfea154e82588c13e4dd7f99a3 (patch)
treee4ee09be7de4a8dc7954e6d2443a79182a76fdbb /sys/dev/vinum
parentde4b15c51246293a1d08282bc2afdf7c99a87573 (diff)
downloadFreeBSD-src-594482926a8049dfea154e82588c13e4dd7f99a3.zip
FreeBSD-src-594482926a8049dfea154e82588c13e4dd7f99a3.tar.gz
Change #if VINUMDEBUG to #ifdef VINUMDEBUG. This is a flag, not a variable.
Diffstat (limited to 'sys/dev/vinum')
-rw-r--r--sys/dev/vinum/request.h4
-rw-r--r--sys/dev/vinum/vinuminterrupt.c8
-rw-r--r--sys/dev/vinum/vinumio.c4
-rw-r--r--sys/dev/vinum/vinumio.h6
-rw-r--r--sys/dev/vinum/vinummemory.c4
-rw-r--r--sys/dev/vinum/vinumobj.h4
-rw-r--r--sys/dev/vinum/vinumrequest.c16
-rw-r--r--sys/dev/vinum/vinumrevive.c12
8 files changed, 27 insertions, 31 deletions
diff --git a/sys/dev/vinum/request.h b/sys/dev/vinum/request.h
index 3d215e3..4e10748 100644
--- a/sys/dev/vinum/request.h
+++ b/sys/dev/vinum/request.h
@@ -33,7 +33,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: request.h,v 1.19 2000/11/24 03:41:51 grog Exp grog $
+ * $Id: request.h,v 1.21 2001/05/23 23:03:23 grog Exp grog $
* $FreeBSD$
*/
@@ -50,7 +50,7 @@ enum xferinfo {
XFR_PARITY_BLOCK = 0x80, /* parity block in request */
XFR_BAD_SUBDISK = 0x100, /* this subdisk is dead */
XFR_MALLOCED = 0x200, /* this buffer is malloced */
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
XFR_PHASE2 = 0x800, /* documentation only: 2nd phase write */
#endif
XFR_REVIVECONFLICT = 0x1000, /* possible conflict with a revive operation */
diff --git a/sys/dev/vinum/vinuminterrupt.c b/sys/dev/vinum/vinuminterrupt.c
index 461c06b..288fa58 100644
--- a/sys/dev/vinum/vinuminterrupt.c
+++ b/sys/dev/vinum/vinuminterrupt.c
@@ -39,7 +39,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinuminterrupt.c,v 1.12 2000/11/24 03:41:42 grog Exp grog $
+ * $Id: vinuminterrupt.c,v 1.14 2001/05/23 23:03:37 grog Exp grog $
* $FreeBSD$
*/
@@ -205,7 +205,7 @@ complete_rqe(struct buf *bp)
}
}
if (rq->active == 0) { /* request finished, */
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
if (debug & DEBUG_RESID) {
if (ubp->b_resid != 0) /* still something to transfer? */
Debugger("resid");
@@ -406,7 +406,7 @@ complete_raid5_write(struct rqelement *rqe)
vinum_conf.active++;
if (vinum_conf.active >= vinum_conf.maxactive)
vinum_conf.maxactive = vinum_conf.active;
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
if (debug & DEBUG_ADDRESSES)
log(LOG_DEBUG,
" %s dev %d.%d, sd %d, offset 0x%x, devoffset 0x%x, length %ld\n",
@@ -445,7 +445,7 @@ complete_raid5_write(struct rqelement *rqe)
if (vinum_conf.active >= vinum_conf.maxactive)
vinum_conf.maxactive = vinum_conf.active;
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
if (debug & DEBUG_ADDRESSES)
log(LOG_DEBUG,
" %s dev %d.%d, sd %d, offset 0x%x, devoffset 0x%x, length %ld\n",
diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c
index 7e10209..579e3cc 100644
--- a/sys/dev/vinum/vinumio.c
+++ b/sys/dev/vinum/vinumio.c
@@ -33,7 +33,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinumio.c,v 1.30 2000/05/10 23:23:30 grog Exp grog $
+ * $Id: vinumio.c,v 1.32 2001/05/23 23:03:45 grog Exp grog $
* $FreeBSD$
*/
@@ -170,7 +170,7 @@ set_drive_parms(struct drive *drive)
getmicrotime(&drive->label.date_of_birth); /* and current time */
drive->label.drive_size = ((u_int64_t) drive->partinfo.part->p_size) /* size of the drive in bytes */
*((u_int64_t) drive->partinfo.disklab->d_secsize);
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
if (debug & DEBUG_BIGDRIVE) /* pretend we're 100 times as big */
drive->label.drive_size *= 100;
#endif
diff --git a/sys/dev/vinum/vinumio.h b/sys/dev/vinum/vinumio.h
index 5930624..b180e0c 100644
--- a/sys/dev/vinum/vinumio.h
+++ b/sys/dev/vinum/vinumio.h
@@ -33,17 +33,13 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinumio.h,v 1.19 2000/04/26 04:17:33 grog Exp grog $
+ * $Id: vinumio.h,v 1.21 2001/05/22 07:29:23 grog Exp grog $
* $FreeBSD$
*/
#define L 'F' /* ID letter of our ioctls */
-#ifdef VINUMDEBUG
#define MAX_IOCTL_REPLY 1024
-#else
-#define MAX_IOCTL_REPLY 256
-#endif
#ifdef VINUMDEBUG
struct debuginfo {
diff --git a/sys/dev/vinum/vinummemory.c b/sys/dev/vinum/vinummemory.c
index fb03679..c267a44 100644
--- a/sys/dev/vinum/vinummemory.c
+++ b/sys/dev/vinum/vinummemory.c
@@ -33,7 +33,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinummemory.c,v 1.26 2001/01/04 00:15:49 grog Exp grog $
+ * $Id: vinummemory.c,v 1.28 2001/05/23 23:04:06 grog Exp grog $
* $FreeBSD$
*/
@@ -125,7 +125,7 @@ expand_table(void **table, int oldsize, int newsize)
}
}
-#if VINUMDEBUG /* XXX debug */
+#ifdef VINUMDEBUG /* XXX debug */
#define MALLOCENTRIES 16384
int malloccount = 0;
int highwater = 0; /* highest index ever allocated */
diff --git a/sys/dev/vinum/vinumobj.h b/sys/dev/vinum/vinumobj.h
index 91c9f34..8f81264 100644
--- a/sys/dev/vinum/vinumobj.h
+++ b/sys/dev/vinum/vinumobj.h
@@ -37,7 +37,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinumobj.h,v 1.1 2001/05/22 04:07:22 grog Exp grog $
+ * $Id: vinumobj.h,v 1.2 2001/05/23 23:04:18 grog Exp grog $
* $FreeBSD$
*/
@@ -126,7 +126,7 @@ struct __vinum_conf
int active; /* current number of requests outstanding */
int maxactive; /* maximum number of requests ever outstanding */
#ifdef _KERNEL
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
struct request *lastrq;
struct buf *lastbuf;
#endif
diff --git a/sys/dev/vinum/vinumrequest.c b/sys/dev/vinum/vinumrequest.c
index af8147b..9d90f6c 100644
--- a/sys/dev/vinum/vinumrequest.c
+++ b/sys/dev/vinum/vinumrequest.c
@@ -37,7 +37,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinumrequest.c,v 1.30 2001/01/09 04:20:55 grog Exp grog $
+ * $Id: vinumrequest.c,v 1.32 2001/05/23 23:04:38 grog Exp grog $
* $FreeBSD$
*/
@@ -185,7 +185,7 @@ vinumstart(struct buf *bp, int reviveok)
struct request *rq; /* build up our request here */
enum requeststatus status;
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
if (debug & DEBUG_LASTREQS)
logrq(loginfo_user_bp, (union rqinfou) bp, bp);
#endif
@@ -337,7 +337,7 @@ launch_requests(struct request *rq, int reviveok)
} else
sd->waitlist = rq; /* hook our request at the front */
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
if (debug & DEBUG_REVIVECONFLICT)
log(LOG_DEBUG,
"Revive conflict sd %d: %p\n%s dev %d.%d, offset 0x%x, length %ld\n",
@@ -352,7 +352,7 @@ launch_requests(struct request *rq, int reviveok)
return 0; /* and get out of here */
}
rq->active = 0; /* nothing yet */
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
if (debug & DEBUG_ADDRESSES)
log(LOG_DEBUG,
"Request: %p\n%s dev %d.%d, offset 0x%x, length %ld\n",
@@ -627,7 +627,7 @@ bre(struct request *rq,
*/
if (rqe->sdoffset + rqe->datalen > sd->sectors) { /* ends beyond the end of the subdisk? */
rqe->datalen = sd->sectors - rqe->sdoffset; /* truncate */
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
if (debug & DEBUG_EOFINFO) { /* tell on the request */
log(LOG_DEBUG,
"vinum: EOF on plex %s, sd %s offset %x (user offset %x)\n",
@@ -901,7 +901,7 @@ sdio(struct buf *bp)
daddr_t endoffset;
struct drive *drive;
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
if (debug & DEBUG_LASTREQS)
logrq(loginfo_sdio, (union rqinfou) bp, bp);
#endif
@@ -966,7 +966,7 @@ sdio(struct buf *bp)
return;
}
}
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
if (debug & DEBUG_ADDRESSES)
log(LOG_DEBUG,
" %s dev %d.%d, sd %d, offset 0x%x, devoffset 0x%x, length %ld\n",
@@ -979,7 +979,7 @@ sdio(struct buf *bp)
sbp->b.b_bcount);
#endif
s = splbio();
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
if (debug & DEBUG_LASTREQS)
logrq(loginfo_sdiol, (union rqinfou) &sbp->b, &sbp->b);
#endif
diff --git a/sys/dev/vinum/vinumrevive.c b/sys/dev/vinum/vinumrevive.c
index a3cbdb6..d8fde41 100644
--- a/sys/dev/vinum/vinumrevive.c
+++ b/sys/dev/vinum/vinumrevive.c
@@ -37,7 +37,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinumrevive.c,v 1.10 2000/01/03 03:40:54 grog Exp grog $
+ * $Id: vinumrevive.c,v 1.15 2001/05/23 23:04:48 grog Exp grog $
* $FreeBSD$
*/
@@ -82,7 +82,7 @@ revive_block(int sdno)
vol = NULL;
if ((sd->revive_blocksize == 0) /* no block size */
- ||(sd->revive_blocksize & ((1 << DEV_BSHIFT) - 1))) /* or invalid block size */
+ ||(sd->revive_blocksize & ((1 << DEV_BSHIFT) - 1))) /* or invalid block size */
sd->revive_blocksize = DEFAULT_REVIVE_BLOCKSIZE;
else if (sd->revive_blocksize > MAX_REVIVE_BLOCKSIZE)
sd->revive_blocksize = MAX_REVIVE_BLOCKSIZE;
@@ -109,7 +109,7 @@ revive_block(int sdno)
stripeoffset = sd->revived % plex->stripesize; /* offset from beginning of stripe */
plexblkno = sd->plexoffset /* base */
+ (sd->revived - stripeoffset) * (plex->subdisks - 1) /* offset to beginning of stripe */
- + stripeoffset; /* offset from beginning of stripe */
+ +stripeoffset; /* offset from beginning of stripe */
stripe = (sd->revived / plex->stripesize); /* stripe number */
/* Make sure we don't go beyond the end of the band. */
@@ -155,8 +155,8 @@ revive_block(int sdno)
lock = lockrange(plexblkno << DEV_BSHIFT, bp, plex); /* lock it */
if (vol != NULL) /* it's part of a volume, */
/*
- * First, read the data from the volume. We
- * don't care which plex, that's bre's job.
+ * First, read the data from the volume. We
+ * don't care which plex, that's bre's job.
*/
bp->b_dev = VINUMDEV(plex->volno, 0, 0, VINUM_VOLUME_TYPE); /* create the device number */
else /* it's an unattached plex */
@@ -196,7 +196,7 @@ revive_block(int sdno)
if (lock) /* we took a lock, */
unlockrange(sd->plexno, lock); /* give it back */
while (sd->waitlist) { /* we have waiting requests */
-#if VINUMDEBUG
+#ifdef VINUMDEBUG
struct request *rq = sd->waitlist;
if (debug & DEBUG_REVIVECONFLICT)
OpenPOWER on IntegriCloud