diff options
author | phk <phk@FreeBSD.org> | 2002-10-14 10:02:24 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-14 10:02:24 +0000 |
commit | 8298a7f6adc2cfd2fc6b8357666aafea5f738ed5 (patch) | |
tree | d375be22c1ad8d82eed576c62ae3377b242d7140 /sys/geom/geom_io.c | |
parent | d9865aa4d5611249e32729a34e06e1d59fabeaec (diff) | |
download | FreeBSD-src-8298a7f6adc2cfd2fc6b8357666aafea5f738ed5.zip FreeBSD-src-8298a7f6adc2cfd2fc6b8357666aafea5f738ed5.tar.gz |
Add more KASSERTS.
Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/geom/geom_io.c')
-rw-r--r-- | sys/geom/geom_io.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index deb8978..a33c2ee 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -212,7 +212,9 @@ g_io_request(struct bio *bp, struct g_consumer *cp) int error; off_t excess; - KASSERT(cp != NULL, ("bio_request on thin air")); + KASSERT(cp != NULL, ("NULL cp in g_io_request")); + KASSERT(bp != NULL, ("NULL bp in g_io_request")); + KASSERT(bp->bio_data != NULL, ("NULL bp->data in g_io_request")); error = 0; bp->bio_from = cp; bp->bio_to = cp->provider; @@ -300,6 +302,10 @@ void g_io_deliver(struct bio *bp, int error) { + KASSERT(bp != NULL, ("NULL bp in g_io_deliver")); + KASSERT(bp->bio_from != NULL, ("NULL bio_from in g_io_deliver")); + KASSERT(bp->bio_from->geom != NULL, ("NULL bio_from->geom in g_io_deliver")); + KASSERT(bp->bio_to != NULL, ("NULL bio_to in g_io_deliver")); g_trace(G_T_BIO, "g_io_deliver(%p) from %p(%s) to %p(%s) cmd %d error %d", bp, bp->bio_from, bp->bio_from->geom->name, |