summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2001-05-06 18:57:08 +0000
committerphk <phk@FreeBSD.org>2001-05-06 18:57:08 +0000
commit33cb778d44db479f7586e1b5c1f9b400db720f22 (patch)
tree433d32ee36acdb2496aa09a3ca645ebe58525c0d /sys
parent11b53786774252b97e90f3cc690239b032c295bd (diff)
downloadFreeBSD-src-33cb778d44db479f7586e1b5c1f9b400db720f22.zip
FreeBSD-src-33cb778d44db479f7586e1b5c1f9b400db720f22.tar.gz
Introduce bioerror(struct bio*, int err, int complete);
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/bio.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/sys/bio.h b/sys/sys/bio.h
index 404bae1..4e01e1e 100644
--- a/sys/sys/bio.h
+++ b/sys/sys/bio.h
@@ -103,6 +103,16 @@ biodone(struct bio *bp)
bp->bio_done(bp);
}
+static __inline__ void
+bioerror(struct bio *bp, int error, int complete)
+{
+ if (complete)
+ bp->bio_resid = bp->bio_bcount;
+ bp->bio_error = error;
+ bp->bio_flags |= BIO_ERROR;
+ biodone(bp);
+}
+
struct bio_queue_head {
TAILQ_HEAD(bio_queue, bio) queue;
daddr_t last_pblkno;
OpenPOWER on IntegriCloud