Calculate bio_completed properly or die!

Approved by:	phk
This commit is contained in:
Pawel Jakub Dawidek 2004-04-04 20:37:28 +00:00
parent 52710de1cb
commit 46aeebec57

View file

@ -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",