summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/geom_io.c')
-rw-r--r--sys/geom/geom_io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index 507069b..3c32972 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -279,6 +279,9 @@ g_io_deliver(struct bio *bp, int error)
}
KASSERT(cp != NULL, ("NULL bio_from in g_io_deliver"));
KASSERT(cp->geom != NULL, ("NULL bio_from->geom in g_io_deliver"));
+ KASSERT(bp->bio_completed >= 0, ("bio_completed can't be less than 0"));
+ KASSERT(bp->bio_completed <= bp->bio_length,
+ ("bio_completed can't be greater than bio_length"));
g_trace(G_T_BIO,
"g_io_deliver(%p) from %p(%s) to %p(%s) cmd %d error %d off %jd len %jd",
OpenPOWER on IntegriCloud