diff options
| author | Greg Lehey <grog@FreeBSD.org> | 1999-03-18 23:26:22 +0000 |
|---|---|---|
| committer | Greg Lehey <grog@FreeBSD.org> | 1999-03-18 23:26:22 +0000 |
| commit | 6f70e1c54219037250668e192a01119d60bd5e23 (patch) | |
| tree | b5b9c85ee20586f59ca6616323db499135a688ee /sys/dev/vinum | |
| parent | a54220722343fa9897e7df8b172735f678765ff9 (diff) | |
Notes
Diffstat (limited to 'sys/dev/vinum')
| -rw-r--r-- | sys/dev/vinum/request.h | 1 | ||||
| -rw-r--r-- | sys/dev/vinum/vinum.c | 12 | ||||
| -rw-r--r-- | sys/dev/vinum/vinumdaemon.c | 2 | ||||
| -rw-r--r-- | sys/dev/vinum/vinumext.h | 2 | ||||
| -rw-r--r-- | sys/dev/vinum/vinuminterrupt.c | 4 | ||||
| -rw-r--r-- | sys/dev/vinum/vinumio.c | 5 | ||||
| -rw-r--r-- | sys/dev/vinum/vinummemory.c | 4 | ||||
| -rw-r--r-- | sys/dev/vinum/vinumrequest.c | 6 |
8 files changed, 15 insertions, 21 deletions
diff --git a/sys/dev/vinum/request.h b/sys/dev/vinum/request.h index cf015130e287..93010e6f5016 100644 --- a/sys/dev/vinum/request.h +++ b/sys/dev/vinum/request.h @@ -213,6 +213,7 @@ union daemoninfo { /* and the request information */ struct request *rq; /* for daemonrq_ioerror */ struct sd *sd; /* for daemonrq_revive */ struct plex *plex; /* for daemonrq_init */ + int nothing; /* for passing NULL */ }; struct daemonq { diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c index 01a2a9cf9ef2..bdd949da2c8a 100644 --- a/sys/dev/vinum/vinum.c +++ b/sys/dev/vinum/vinum.c @@ -194,7 +194,7 @@ free_vinum(int cleardrive) } while ((vinum_conf.flags & (VF_STOPPING | VF_DAEMONOPEN)) == (VF_STOPPING | VF_DAEMONOPEN)) { /* at least one daemon open, we're stopping */ - queue_daemon_request(daemonrq_return, NULL); /* stop the daemon */ + queue_daemon_request(daemonrq_return, (union daemoninfo) NULL); /* stop the daemon */ tsleep(&vinumclose, PUSER, "vstop", 0); /* and wait for it */ } if (SD != NULL) @@ -243,19 +243,13 @@ vinum_modevent(module_t mod, modeventtype_t type, void *unused) moduledata_t vinum_mod = { "vinum", - vinum_modevent, + (modeventhand_t) vinum_modevent, 0 }; DECLARE_MODULE(vinum, vinum_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); /* ARGSUSED */ -/* - * Open a vinum object - * At the moment, we only open volumes and the - * super device. It's a nice concept to be - * able to open drives, subdisks and plexes, but - * I can't think what good it could be - */ +/* Open a vinum object */ int vinumopen(dev_t dev, int flags, diff --git a/sys/dev/vinum/vinumdaemon.c b/sys/dev/vinum/vinumdaemon.c index eb11b7b341cb..f02cf14c5bc3 100644 --- a/sys/dev/vinum/vinumdaemon.c +++ b/sys/dev/vinum/vinumdaemon.c @@ -208,7 +208,7 @@ vinum_finddaemon() int result; if (daemonpid != 0) { /* we think we have a daemon, */ - queue_daemon_request(daemonrq_ping, NULL); /* queue a ping */ + queue_daemon_request(daemonrq_ping, (union daemoninfo) NULL); /* queue a ping */ result = tsleep(&vinum_finddaemon, PUSER, "reap", 2 * hz); if (result == 0) /* yup, the daemon's up and running */ return 0; diff --git a/sys/dev/vinum/vinumext.h b/sys/dev/vinum/vinumext.h index 6e8c2f1780a8..220fc4aeb1bc 100644 --- a/sys/dev/vinum/vinumext.h +++ b/sys/dev/vinum/vinumext.h @@ -41,7 +41,7 @@ extern struct _vinum_conf vinum_conf; /* configuration information */ #ifdef VINUMDEBUG -extern debug; /* debug flags */ +extern int debug; /* debug flags */ #endif #define CHECKALLOC(ptr, msg) \ diff --git a/sys/dev/vinum/vinuminterrupt.c b/sys/dev/vinum/vinuminterrupt.c index 5467977439d6..9ea3ca2b1093 100644 --- a/sys/dev/vinum/vinuminterrupt.c +++ b/sys/dev/vinum/vinuminterrupt.c @@ -74,7 +74,7 @@ complete_rqe(struct buf *bp) #ifdef VINUMDEBUG if (debug & DEBUG_LASTREQS) - logrq(loginfo_iodone, rqe, ubp); + logrq(loginfo_iodone, (union rqinfou) rqe, ubp); #endif if ((bp->b_flags & B_ERROR) != 0) { /* transfer in error */ if (bp->b_error != 0) /* did it return a number? */ @@ -143,7 +143,7 @@ complete_rqe(struct buf *bp) ubp->b_flags |= B_ERROR; /* yes, propagate to user */ ubp->b_error = rq->error; } else /* try to recover */ - queue_daemon_request(daemonrq_ioerror, rq); /* let the daemon complete */ + queue_daemon_request(daemonrq_ioerror, (union daemoninfo) rq); /* let the daemon complete */ } else { ubp->b_resid = 0; /* completed our transfer */ if (rq->isplex == 0) /* volume request, */ diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c index 64cb3d06ecdb..f8868aa70551 100644 --- a/sys/dev/vinum/vinumio.c +++ b/sys/dev/vinum/vinumio.c @@ -596,8 +596,7 @@ format_config(char *config, int len) bzero(config, len); - - /* Then the volume configuration */ + /* First, the volume configuration */ for (i = 0; i < vinum_conf.volumes_used; i++) { struct volume *vol; @@ -693,7 +692,7 @@ format_config(char *config, int len) void save_config(void) { - queue_daemon_request(daemonrq_saveconfig, NULL); + queue_daemon_request(daemonrq_saveconfig, (union daemoninfo) NULL); } /* diff --git a/sys/dev/vinum/vinummemory.c b/sys/dev/vinum/vinummemory.c index bb96158d9baa..bbff71975c6a 100644 --- a/sys/dev/vinum/vinummemory.c +++ b/sys/dev/vinum/vinummemory.c @@ -79,7 +79,7 @@ static struct mc malloced[MALLOCENTRIES]; int lastfree = 0; struct mc freeinfo[FREECOUNT]; -static total_malloced; +static int total_malloced; static int mallocseq = 0; caddr_t @@ -93,7 +93,7 @@ MMalloc(int size, char *file, int line) log(LOG_ERR, "vinum: can't allocate table space to trace memory allocation"); return 0; /* can't continue */ } - result = malloc(size, M_DEVBUF, M_WAITOK); /* use malloc for smaller and irregular stuff */ + result = malloc(size, M_DEVBUF, M_WAITOK); if (result == NULL) log(LOG_ERR, "vinum: can't allocate %d bytes from %s:%d\n", size, file, line); else { diff --git a/sys/dev/vinum/vinumrequest.c b/sys/dev/vinum/vinumrequest.c index b99d095815c3..f6ac0822fa17 100644 --- a/sys/dev/vinum/vinumrequest.c +++ b/sys/dev/vinum/vinumrequest.c @@ -173,7 +173,7 @@ vinumstart(struct buf *bp, int reviveok) #if VINUMDEBUG if (debug & DEBUG_LASTREQS) - logrq(loginfo_user_bp, bp, bp); + logrq(loginfo_user_bp, (union rqinfou) bp, bp); #endif /* @@ -364,7 +364,7 @@ launch_requests(struct request *rq, int reviveok) vinum_conf.lastrq = (int) rq; vinum_conf.lastbuf = rq->bp; if (debug & DEBUG_LASTREQS) - logrq(loginfo_user_bpl, rq->bp, rq->bp); + logrq(loginfo_user_bpl, (union rqinfou) rq->bp, rq->bp); #endif for (rqg = rq->rqg; rqg != NULL; rqg = rqg->next) { /* through the whole request chain */ rqg->active = rqg->count; /* they're all active */ @@ -393,7 +393,7 @@ launch_requests(struct request *rq, int reviveok) rqe->sdno, rqe->b.b_vp->v_numoutput); if (debug & DEBUG_LASTREQS) - logrq(loginfo_rqe, rqe, rq->bp); + logrq(loginfo_rqe, (union rqinfou) rqe, rq->bp); #endif /* fire off the request */ s = splbio(); |
