summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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