summaryrefslogtreecommitdiffstats
path: root/lkm/vinum/interrupt.c
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>1998-10-21 08:32:32 +0000
committergrog <grog@FreeBSD.org>1998-10-21 08:32:32 +0000
commitc4f583ab45280938d0a6fb05b51d4ecadfc1f413 (patch)
treedae6747deab534df8daae0214b7739eb96b1f003 /lkm/vinum/interrupt.c
parentf8807b8fc154475494280090923ce6f4d311d64e (diff)
downloadFreeBSD-src-c4f583ab45280938d0a6fb05b51d4ecadfc1f413.zip
FreeBSD-src-c4f583ab45280938d0a6fb05b51d4ecadfc1f413.tar.gz
config.c:
config_drive: Catch an instance of anonymous drives. Doubtless many remain. interrupt.c: complete_rqe: Call logrq to log iodone events if DEBUG_LASTREQS is set. Call set_sd_state with setstate_noupdate to avoid buffered I/O out of interrupt context. Use define DEBUG_RESID instead of constant. memory.c: Remove dead expandrq() function Malloc: Remove directory component of file names in malloc table. Add function vinum_rqinfo (part of the request tracing stuff). request.c: Add function logrq (part of the request tracing stuff). vinumstrategy: Check whether config needs to be written to disk, do it if so. This is a stopgap until the Vinum daemon (bacchusd? oenologistd?) is written. If DEBUG_LASTREQS is set, call logrq to log user buffer headers. launch_requests: Correct format of debug output to console. If DEBUG_LASTREQS is set, call logrq to log request elements. request.h: Add definitions for request trace. state.c: set_sd_state: Check flags for setstate_noupdate. If set, don't write the config to disk, just set global VF_DIRTYCONFIG flag. This is part of the kludge to avoid writing config from an interrupt context. vinumext.h: Add declaration for vinum_rqinfo, put inside #ifdef DEBUG Remove dead macro expandrq vinumio.h: Increase maximum ioctl reply length to 4 kB if DEBUG is set. Define VINUM_RQINFO ioctl if DEBUG is set. vinumioctl.c: vinumioctl: Change implementation of VINUM_DEBUG ioctl: use a debug flag (DEBUG_REMOTEGDB) to decide whether to go into remote debugging or not. Implement VINUM_RQINFO. vinumkw.h: Define kw_info even when not debugging. vinumvar.h: Define VF_DIRTYCONFIG Add pointers to request info to vinum_info if DEBUG is set. Define setstate_noupdate Define additional debug bits DEBUG_RESID, DEBUG_LASTREQS and DEBUG_REMOTEGDB.
Diffstat (limited to 'lkm/vinum/interrupt.c')
-rw-r--r--lkm/vinum/interrupt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lkm/vinum/interrupt.c b/lkm/vinum/interrupt.c
index e7eb034..1557cfe 100644
--- a/lkm/vinum/interrupt.c
+++ b/lkm/vinum/interrupt.c
@@ -69,14 +69,19 @@ complete_rqe(struct buf *bp)
rqe = (struct rqelement *) bp; /* point to the element element that completed */
rqg = rqe->rqg; /* and the request group */
rq = rqg->rq; /* and the complete request */
+ ubp = rq->bp; /* user buffer */
+#ifdef DEBUG
+ if (debug & DEBUG_LASTREQS)
+ logrq(loginfo_iodone, rqe, ubp);
+#endif
if ((bp->b_flags & B_ERROR) != 0) { /* transfer in error */
if (bp->b_error != 0) /* did it return a number? */
rq->error = bp->b_error; /* yes, put it in. */
else if (rq->error == 0) /* no: do we have one already? */
rq->error = EIO; /* no: catchall "I/O error" */
if (rq->error == EIO) /* I/O error, */
- set_sd_state(rqe->sdno, sd_crashed, setstate_force); /* take the subdisk down */
+ set_sd_state(rqe->sdno, sd_crashed, setstate_force | setstate_noupdate); /* take the subdisk down */
}
/* Now update the statistics */
if (bp->b_flags & B_READ) { /* read operation */
@@ -94,13 +99,12 @@ complete_rqe(struct buf *bp)
PLEX[rqe->rqg->plexno].writes++;
PLEX[rqe->rqg->plexno].bytes_written += bp->b_bcount;
}
- ubp = rq->bp; /* user buffer */
rqg->active--; /* one less request active */
if (rqg->active == 0) /* request group finished, */
rq->active--; /* one less */
if (rq->active == 0) { /* request finished, */
#if DEBUG
- if (debug & 4) {
+ if (debug & DEBUG_RESID) {
if (ubp->b_resid != 0) /* still something to transfer? */
Debugger("resid");
OpenPOWER on IntegriCloud