Index: geom_io.c =================================================================== RCS file: /usr/repo/src/sys/geom/geom_io.c,v retrieving revision 1.71 diff -u -p -r1.71 geom_io.c --- geom_io.c 31 Oct 2006 21:11:20 -0000 1.71 +++ geom_io.c 28 Jan 2007 11:45:13 -0000 @@ -343,9 +343,13 @@ g_io_request(struct bio *bp, struct g_co bp->_bio_cflags = bp->bio_cflags; #endif - if (bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE|BIO_GETATTR)) { + if (bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_GETATTR)) { KASSERT(bp->bio_data != NULL, - ("NULL bp->data in g_io_request")); + ("NULL bp->data in g_io_request(cmd=%hhu)", bp->bio_cmd)); + } + if (bp->bio_cmd & (BIO_DELETE|BIO_FLUSH)) { + KASSERT(bp->bio_data == NULL, + ("non-NULL bp->data in g_io_request(cmd=%hhu)", bp->bio_cmd)); } if (bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) { KASSERT(bp->bio_offset % cp->provider->sectorsize == 0,