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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index 18cedcd..e8e00ed 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -343,9 +343,14 @@ g_io_request(struct bio *bp, struct g_consumer *cp)
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,
OpenPOWER on IntegriCloud